mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-b3803ecefb071988/out/
development.rs

1#![doc = "MAVLink development dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 0u8;
23pub const DIALECT_NUMBER: u8 = 0u8;
24#[cfg_attr(feature = "ts", derive(TS))]
25#[cfg_attr(feature = "ts", ts(export))]
26#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28#[cfg_attr(feature = "serde", serde(tag = "type"))]
29#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30#[repr(u32)]
31#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
32pub enum ActuatorConfiguration {
33    #[doc = "Do nothing."]
34    ACTUATOR_CONFIGURATION_NONE = 0,
35    #[doc = "Command the actuator to beep now."]
36    ACTUATOR_CONFIGURATION_BEEP = 1,
37    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
38    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
39    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
41    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
42    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
45}
46impl ActuatorConfiguration {
47    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
48}
49impl Default for ActuatorConfiguration {
50    fn default() -> Self {
51        Self::DEFAULT
52    }
53}
54#[cfg_attr(feature = "ts", derive(TS))]
55#[cfg_attr(feature = "ts", ts(export))]
56#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
57#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
58#[cfg_attr(feature = "serde", serde(tag = "type"))]
59#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
60#[repr(u32)]
61#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
62pub enum ActuatorOutputFunction {
63    #[doc = "No function (disabled)."]
64    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
65    #[doc = "Motor 1"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
67    #[doc = "Motor 2"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
69    #[doc = "Motor 3"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
71    #[doc = "Motor 4"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
73    #[doc = "Motor 5"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
75    #[doc = "Motor 6"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
77    #[doc = "Motor 7"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
79    #[doc = "Motor 8"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
81    #[doc = "Motor 9"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
83    #[doc = "Motor 10"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
85    #[doc = "Motor 11"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
87    #[doc = "Motor 12"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
89    #[doc = "Motor 13"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
91    #[doc = "Motor 14"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
93    #[doc = "Motor 15"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
95    #[doc = "Motor 16"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
97    #[doc = "Servo 1"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
99    #[doc = "Servo 2"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
101    #[doc = "Servo 3"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
103    #[doc = "Servo 4"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
105    #[doc = "Servo 5"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
107    #[doc = "Servo 6"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
109    #[doc = "Servo 7"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
111    #[doc = "Servo 8"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
113    #[doc = "Servo 9"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
115    #[doc = "Servo 10"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
117    #[doc = "Servo 11"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
119    #[doc = "Servo 12"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
121    #[doc = "Servo 13"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
123    #[doc = "Servo 14"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
125    #[doc = "Servo 15"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
127    #[doc = "Servo 16"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
129}
130impl ActuatorOutputFunction {
131    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
132}
133impl Default for ActuatorOutputFunction {
134    fn default() -> Self {
135        Self::DEFAULT
136    }
137}
138#[cfg_attr(feature = "ts", derive(TS))]
139#[cfg_attr(feature = "ts", ts(export))]
140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
142#[cfg_attr(feature = "serde", serde(tag = "type"))]
143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
144#[repr(u32)]
145#[doc = "Enumeration of the ADSB altimeter types"]
146pub enum AdsbAltitudeType {
147    #[doc = "Altitude reported from a Baro source using QNH reference"]
148    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
149    #[doc = "Altitude reported from a GNSS source"]
150    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
151}
152impl AdsbAltitudeType {
153    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
154}
155impl Default for AdsbAltitudeType {
156    fn default() -> Self {
157        Self::DEFAULT
158    }
159}
160#[cfg_attr(feature = "ts", derive(TS))]
161#[cfg_attr(feature = "ts", ts(export))]
162#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
164#[cfg_attr(feature = "serde", serde(tag = "type"))]
165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
166#[repr(u32)]
167#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
168pub enum AdsbEmitterType {
169    ADSB_EMITTER_TYPE_NO_INFO = 0,
170    ADSB_EMITTER_TYPE_LIGHT = 1,
171    ADSB_EMITTER_TYPE_SMALL = 2,
172    ADSB_EMITTER_TYPE_LARGE = 3,
173    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
174    ADSB_EMITTER_TYPE_HEAVY = 5,
175    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
176    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
177    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
178    ADSB_EMITTER_TYPE_GLIDER = 9,
179    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
180    ADSB_EMITTER_TYPE_PARACHUTE = 11,
181    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
182    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
183    ADSB_EMITTER_TYPE_UAV = 14,
184    ADSB_EMITTER_TYPE_SPACE = 15,
185    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
186    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
187    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
188    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
189}
190impl AdsbEmitterType {
191    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
192}
193impl Default for AdsbEmitterType {
194    fn default() -> Self {
195        Self::DEFAULT
196    }
197}
198bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
199impl AdsbFlags {
200    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
201}
202impl Default for AdsbFlags {
203    fn default() -> Self {
204        Self::DEFAULT
205    }
206}
207bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Airspeed sensor flags"] pub struct AirspeedSensorFlags : u8 { # [doc = "Airspeed sensor is unhealthy"] const AIRSPEED_SENSOR_UNHEALTHY = 1 ; # [doc = "True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control."] const AIRSPEED_SENSOR_USING = 2 ; } }
208impl AirspeedSensorFlags {
209    pub const DEFAULT: Self = Self::AIRSPEED_SENSOR_UNHEALTHY;
210}
211impl Default for AirspeedSensorFlags {
212    fn default() -> Self {
213        Self::DEFAULT
214    }
215}
216bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
217impl AisFlags {
218    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
219}
220impl Default for AisFlags {
221    fn default() -> Self {
222        Self::DEFAULT
223    }
224}
225#[cfg_attr(feature = "ts", derive(TS))]
226#[cfg_attr(feature = "ts", ts(export))]
227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
229#[cfg_attr(feature = "serde", serde(tag = "type"))]
230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
231#[repr(u32)]
232#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
233pub enum AisNavStatus {
234    #[doc = "Under way using engine."]
235    UNDER_WAY = 0,
236    AIS_NAV_ANCHORED = 1,
237    AIS_NAV_UN_COMMANDED = 2,
238    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
239    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
240    AIS_NAV_MOORED = 5,
241    AIS_NAV_AGROUND = 6,
242    AIS_NAV_FISHING = 7,
243    AIS_NAV_SAILING = 8,
244    AIS_NAV_RESERVED_HSC = 9,
245    AIS_NAV_RESERVED_WIG = 10,
246    AIS_NAV_RESERVED_1 = 11,
247    AIS_NAV_RESERVED_2 = 12,
248    AIS_NAV_RESERVED_3 = 13,
249    #[doc = "Search And Rescue Transponder."]
250    AIS_NAV_AIS_SART = 14,
251    #[doc = "Not available (default)."]
252    AIS_NAV_UNKNOWN = 15,
253}
254impl AisNavStatus {
255    pub const DEFAULT: Self = Self::UNDER_WAY;
256}
257impl Default for AisNavStatus {
258    fn default() -> Self {
259        Self::DEFAULT
260    }
261}
262#[cfg_attr(feature = "ts", derive(TS))]
263#[cfg_attr(feature = "ts", ts(export))]
264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
266#[cfg_attr(feature = "serde", serde(tag = "type"))]
267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
268#[repr(u32)]
269#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
270pub enum AisType {
271    #[doc = "Not available (default)."]
272    AIS_TYPE_UNKNOWN = 0,
273    AIS_TYPE_RESERVED_1 = 1,
274    AIS_TYPE_RESERVED_2 = 2,
275    AIS_TYPE_RESERVED_3 = 3,
276    AIS_TYPE_RESERVED_4 = 4,
277    AIS_TYPE_RESERVED_5 = 5,
278    AIS_TYPE_RESERVED_6 = 6,
279    AIS_TYPE_RESERVED_7 = 7,
280    AIS_TYPE_RESERVED_8 = 8,
281    AIS_TYPE_RESERVED_9 = 9,
282    AIS_TYPE_RESERVED_10 = 10,
283    AIS_TYPE_RESERVED_11 = 11,
284    AIS_TYPE_RESERVED_12 = 12,
285    AIS_TYPE_RESERVED_13 = 13,
286    AIS_TYPE_RESERVED_14 = 14,
287    AIS_TYPE_RESERVED_15 = 15,
288    AIS_TYPE_RESERVED_16 = 16,
289    AIS_TYPE_RESERVED_17 = 17,
290    AIS_TYPE_RESERVED_18 = 18,
291    AIS_TYPE_RESERVED_19 = 19,
292    #[doc = "Wing In Ground effect."]
293    AIS_TYPE_WIG = 20,
294    AIS_TYPE_WIG_HAZARDOUS_A = 21,
295    AIS_TYPE_WIG_HAZARDOUS_B = 22,
296    AIS_TYPE_WIG_HAZARDOUS_C = 23,
297    AIS_TYPE_WIG_HAZARDOUS_D = 24,
298    AIS_TYPE_WIG_RESERVED_1 = 25,
299    AIS_TYPE_WIG_RESERVED_2 = 26,
300    AIS_TYPE_WIG_RESERVED_3 = 27,
301    AIS_TYPE_WIG_RESERVED_4 = 28,
302    AIS_TYPE_WIG_RESERVED_5 = 29,
303    AIS_TYPE_FISHING = 30,
304    AIS_TYPE_TOWING = 31,
305    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
306    AIS_TYPE_TOWING_LARGE = 32,
307    #[doc = "Dredging or other underwater ops."]
308    AIS_TYPE_DREDGING = 33,
309    AIS_TYPE_DIVING = 34,
310    AIS_TYPE_MILITARY = 35,
311    AIS_TYPE_SAILING = 36,
312    AIS_TYPE_PLEASURE = 37,
313    AIS_TYPE_RESERVED_20 = 38,
314    AIS_TYPE_RESERVED_21 = 39,
315    #[doc = "High Speed Craft."]
316    AIS_TYPE_HSC = 40,
317    AIS_TYPE_HSC_HAZARDOUS_A = 41,
318    AIS_TYPE_HSC_HAZARDOUS_B = 42,
319    AIS_TYPE_HSC_HAZARDOUS_C = 43,
320    AIS_TYPE_HSC_HAZARDOUS_D = 44,
321    AIS_TYPE_HSC_RESERVED_1 = 45,
322    AIS_TYPE_HSC_RESERVED_2 = 46,
323    AIS_TYPE_HSC_RESERVED_3 = 47,
324    AIS_TYPE_HSC_RESERVED_4 = 48,
325    AIS_TYPE_HSC_UNKNOWN = 49,
326    AIS_TYPE_PILOT = 50,
327    #[doc = "Search And Rescue vessel."]
328    AIS_TYPE_SAR = 51,
329    AIS_TYPE_TUG = 52,
330    AIS_TYPE_PORT_TENDER = 53,
331    #[doc = "Anti-pollution equipment."]
332    AIS_TYPE_ANTI_POLLUTION = 54,
333    AIS_TYPE_LAW_ENFORCEMENT = 55,
334    AIS_TYPE_SPARE_LOCAL_1 = 56,
335    AIS_TYPE_SPARE_LOCAL_2 = 57,
336    AIS_TYPE_MEDICAL_TRANSPORT = 58,
337    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
338    AIS_TYPE_NONECOMBATANT = 59,
339    AIS_TYPE_PASSENGER = 60,
340    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
341    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
342    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
343    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
344    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
345    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
346    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
347    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
348    AIS_TYPE_PASSENGER_UNKNOWN = 69,
349    AIS_TYPE_CARGO = 70,
350    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
351    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
352    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
353    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
354    AIS_TYPE_CARGO_RESERVED_1 = 75,
355    AIS_TYPE_CARGO_RESERVED_2 = 76,
356    AIS_TYPE_CARGO_RESERVED_3 = 77,
357    AIS_TYPE_CARGO_RESERVED_4 = 78,
358    AIS_TYPE_CARGO_UNKNOWN = 79,
359    AIS_TYPE_TANKER = 80,
360    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
361    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
362    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
363    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
364    AIS_TYPE_TANKER_RESERVED_1 = 85,
365    AIS_TYPE_TANKER_RESERVED_2 = 86,
366    AIS_TYPE_TANKER_RESERVED_3 = 87,
367    AIS_TYPE_TANKER_RESERVED_4 = 88,
368    AIS_TYPE_TANKER_UNKNOWN = 89,
369    AIS_TYPE_OTHER = 90,
370    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
371    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
372    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
373    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
374    AIS_TYPE_OTHER_RESERVED_1 = 95,
375    AIS_TYPE_OTHER_RESERVED_2 = 96,
376    AIS_TYPE_OTHER_RESERVED_3 = 97,
377    AIS_TYPE_OTHER_RESERVED_4 = 98,
378    AIS_TYPE_OTHER_UNKNOWN = 99,
379}
380impl AisType {
381    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
382}
383impl Default for AisType {
384    fn default() -> Self {
385        Self::DEFAULT
386    }
387}
388bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
389impl AttitudeTargetTypemask {
390    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
391}
392impl Default for AttitudeTargetTypemask {
393    fn default() -> Self {
394        Self::DEFAULT
395    }
396}
397#[cfg_attr(feature = "ts", derive(TS))]
398#[cfg_attr(feature = "ts", ts(export))]
399#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
401#[cfg_attr(feature = "serde", serde(tag = "type"))]
402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
403#[repr(u32)]
404#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
405pub enum AutotuneAxis {
406    #[doc = "Autotune roll axis."]
407    AUTOTUNE_AXIS_ROLL = 1,
408    #[doc = "Autotune pitch axis."]
409    AUTOTUNE_AXIS_PITCH = 2,
410    #[doc = "Autotune yaw axis."]
411    AUTOTUNE_AXIS_YAW = 4,
412}
413impl AutotuneAxis {
414    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
415}
416impl Default for AutotuneAxis {
417    fn default() -> Self {
418        Self::DEFAULT
419    }
420}
421bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
422impl CameraCapFlags {
423    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
424}
425impl Default for CameraCapFlags {
426    fn default() -> Self {
427        Self::DEFAULT
428    }
429}
430#[cfg_attr(feature = "ts", derive(TS))]
431#[cfg_attr(feature = "ts", ts(export))]
432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
434#[cfg_attr(feature = "serde", serde(tag = "type"))]
435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
436#[repr(u32)]
437#[doc = "Camera Modes."]
438pub enum CameraMode {
439    #[doc = "Camera is in image/photo capture mode."]
440    CAMERA_MODE_IMAGE = 0,
441    #[doc = "Camera is in video capture mode."]
442    CAMERA_MODE_VIDEO = 1,
443    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
444    CAMERA_MODE_IMAGE_SURVEY = 2,
445}
446impl CameraMode {
447    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
448}
449impl Default for CameraMode {
450    fn default() -> Self {
451        Self::DEFAULT
452    }
453}
454#[cfg_attr(feature = "ts", derive(TS))]
455#[cfg_attr(feature = "ts", ts(export))]
456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
458#[cfg_attr(feature = "serde", serde(tag = "type"))]
459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
460#[repr(u32)]
461#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
462pub enum CameraSource {
463    #[doc = "Default camera source."]
464    CAMERA_SOURCE_DEFAULT = 0,
465    #[doc = "RGB camera source."]
466    CAMERA_SOURCE_RGB = 1,
467    #[doc = "IR camera source."]
468    CAMERA_SOURCE_IR = 2,
469    #[doc = "NDVI camera source."]
470    CAMERA_SOURCE_NDVI = 3,
471}
472impl CameraSource {
473    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
474}
475impl Default for CameraSource {
476    fn default() -> Self {
477        Self::DEFAULT
478    }
479}
480#[cfg_attr(feature = "ts", derive(TS))]
481#[cfg_attr(feature = "ts", ts(export))]
482#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
484#[cfg_attr(feature = "serde", serde(tag = "type"))]
485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
486#[repr(u32)]
487#[doc = "Camera tracking modes"]
488pub enum CameraTrackingMode {
489    #[doc = "Not tracking"]
490    CAMERA_TRACKING_MODE_NONE = 0,
491    #[doc = "Target is a point"]
492    CAMERA_TRACKING_MODE_POINT = 1,
493    #[doc = "Target is a rectangle"]
494    CAMERA_TRACKING_MODE_RECTANGLE = 2,
495}
496impl CameraTrackingMode {
497    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
498}
499impl Default for CameraTrackingMode {
500    fn default() -> Self {
501        Self::DEFAULT
502    }
503}
504#[cfg_attr(feature = "ts", derive(TS))]
505#[cfg_attr(feature = "ts", ts(export))]
506#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
508#[cfg_attr(feature = "serde", serde(tag = "type"))]
509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
510#[repr(u32)]
511#[doc = "Camera tracking status flags"]
512pub enum CameraTrackingStatusFlags {
513    #[doc = "Camera is not tracking"]
514    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
515    #[doc = "Camera is tracking"]
516    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
517    #[doc = "Camera tracking in error state"]
518    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
519}
520impl CameraTrackingStatusFlags {
521    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
522}
523impl Default for CameraTrackingStatusFlags {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
529impl CameraTrackingTargetData {
530    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
531}
532impl Default for CameraTrackingTargetData {
533    fn default() -> Self {
534        Self::DEFAULT
535    }
536}
537#[cfg_attr(feature = "ts", derive(TS))]
538#[cfg_attr(feature = "ts", ts(export))]
539#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
541#[cfg_attr(feature = "serde", serde(tag = "type"))]
542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
543#[repr(u32)]
544#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
545pub enum CameraZoomType {
546    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
547    ZOOM_TYPE_STEP = 0,
548    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
549    ZOOM_TYPE_CONTINUOUS = 1,
550    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
551    ZOOM_TYPE_RANGE = 2,
552    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
553    ZOOM_TYPE_FOCAL_LENGTH = 3,
554    #[doc = "Zoom value as horizontal field of view in degrees."]
555    ZOOM_TYPE_HORIZONTAL_FOV = 4,
556}
557impl CameraZoomType {
558    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
559}
560impl Default for CameraZoomType {
561    fn default() -> Self {
562        Self::DEFAULT
563    }
564}
565#[cfg_attr(feature = "ts", derive(TS))]
566#[cfg_attr(feature = "ts", ts(export))]
567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
569#[cfg_attr(feature = "serde", serde(tag = "type"))]
570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
571#[repr(u32)]
572pub enum CanFilterOp {
573    CAN_FILTER_REPLACE = 0,
574    CAN_FILTER_ADD = 1,
575    CAN_FILTER_REMOVE = 2,
576}
577impl CanFilterOp {
578    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
579}
580impl Default for CanFilterOp {
581    fn default() -> Self {
582        Self::DEFAULT
583    }
584}
585#[cfg_attr(feature = "ts", derive(TS))]
586#[cfg_attr(feature = "ts", ts(export))]
587#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
589#[cfg_attr(feature = "serde", serde(tag = "type"))]
590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
591#[repr(u32)]
592#[doc = "Possible responses from a CELLULAR_CONFIG message."]
593pub enum CellularConfigResponse {
594    #[doc = "Changes accepted."]
595    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
596    #[doc = "Invalid APN."]
597    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
598    #[doc = "Invalid PIN."]
599    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
600    #[doc = "Changes rejected."]
601    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
602    #[doc = "PUK is required to unblock SIM card."]
603    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
604}
605impl CellularConfigResponse {
606    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
607}
608impl Default for CellularConfigResponse {
609    fn default() -> Self {
610        Self::DEFAULT
611    }
612}
613#[cfg_attr(feature = "ts", derive(TS))]
614#[cfg_attr(feature = "ts", ts(export))]
615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
617#[cfg_attr(feature = "serde", serde(tag = "type"))]
618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
619#[repr(u32)]
620#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
621pub enum CellularNetworkFailedReason {
622    #[doc = "No error"]
623    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
624    #[doc = "Error state is unknown"]
625    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
626    #[doc = "SIM is required for the modem but missing"]
627    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
628    #[doc = "SIM is available, but not usable for connection"]
629    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
630}
631impl CellularNetworkFailedReason {
632    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
633}
634impl Default for CellularNetworkFailedReason {
635    fn default() -> Self {
636        Self::DEFAULT
637    }
638}
639#[cfg_attr(feature = "ts", derive(TS))]
640#[cfg_attr(feature = "ts", ts(export))]
641#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
643#[cfg_attr(feature = "serde", serde(tag = "type"))]
644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
645#[repr(u32)]
646#[doc = "Cellular network radio type"]
647pub enum CellularNetworkRadioType {
648    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
649    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
650    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
651    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
652    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
653}
654impl CellularNetworkRadioType {
655    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
656}
657impl Default for CellularNetworkRadioType {
658    fn default() -> Self {
659        Self::DEFAULT
660    }
661}
662#[cfg_attr(feature = "ts", derive(TS))]
663#[cfg_attr(feature = "ts", ts(export))]
664#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
666#[cfg_attr(feature = "serde", serde(tag = "type"))]
667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
668#[repr(u32)]
669#[doc = "These flags encode the cellular network status"]
670pub enum CellularStatusFlag {
671    #[doc = "State unknown or not reportable."]
672    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
673    #[doc = "Modem is unusable"]
674    CELLULAR_STATUS_FLAG_FAILED = 1,
675    #[doc = "Modem is being initialized"]
676    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
677    #[doc = "Modem is locked"]
678    CELLULAR_STATUS_FLAG_LOCKED = 3,
679    #[doc = "Modem is not enabled and is powered down"]
680    CELLULAR_STATUS_FLAG_DISABLED = 4,
681    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
682    CELLULAR_STATUS_FLAG_DISABLING = 5,
683    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
684    CELLULAR_STATUS_FLAG_ENABLING = 6,
685    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
686    CELLULAR_STATUS_FLAG_ENABLED = 7,
687    #[doc = "Modem is searching for a network provider to register"]
688    CELLULAR_STATUS_FLAG_SEARCHING = 8,
689    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
690    CELLULAR_STATUS_FLAG_REGISTERED = 9,
691    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
692    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
693    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
694    CELLULAR_STATUS_FLAG_CONNECTING = 11,
695    #[doc = "One or more packet data bearers is active and connected"]
696    CELLULAR_STATUS_FLAG_CONNECTED = 12,
697}
698impl CellularStatusFlag {
699    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
700}
701impl Default for CellularStatusFlag {
702    fn default() -> Self {
703        Self::DEFAULT
704    }
705}
706#[cfg_attr(feature = "ts", derive(TS))]
707#[cfg_attr(feature = "ts", ts(export))]
708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
710#[cfg_attr(feature = "serde", serde(tag = "type"))]
711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
712#[repr(u32)]
713#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
714pub enum CompMetadataType {
715    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
716    COMP_METADATA_TYPE_GENERAL = 0,
717    #[doc = "Parameter meta data."]
718    COMP_METADATA_TYPE_PARAMETER = 1,
719    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
720    COMP_METADATA_TYPE_COMMANDS = 2,
721    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
722    COMP_METADATA_TYPE_PERIPHERALS = 3,
723    #[doc = "Meta data for the events interface."]
724    COMP_METADATA_TYPE_EVENTS = 4,
725    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
726    COMP_METADATA_TYPE_ACTUATORS = 5,
727}
728impl CompMetadataType {
729    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
730}
731impl Default for CompMetadataType {
732    fn default() -> Self {
733        Self::DEFAULT
734    }
735}
736#[cfg_attr(feature = "ts", derive(TS))]
737#[cfg_attr(feature = "ts", ts(export))]
738#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
740#[cfg_attr(feature = "serde", serde(tag = "type"))]
741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
742#[repr(u32)]
743#[doc = "Indicates the ESC connection type."]
744pub enum EscConnectionType {
745    #[doc = "Traditional PPM ESC."]
746    ESC_CONNECTION_TYPE_PPM = 0,
747    #[doc = "Serial Bus connected ESC."]
748    ESC_CONNECTION_TYPE_SERIAL = 1,
749    #[doc = "One Shot PPM ESC."]
750    ESC_CONNECTION_TYPE_ONESHOT = 2,
751    #[doc = "I2C ESC."]
752    ESC_CONNECTION_TYPE_I2C = 3,
753    #[doc = "CAN-Bus ESC."]
754    ESC_CONNECTION_TYPE_CAN = 4,
755    #[doc = "DShot ESC."]
756    ESC_CONNECTION_TYPE_DSHOT = 5,
757}
758impl EscConnectionType {
759    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
760}
761impl Default for EscConnectionType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
767impl EscFailureFlags {
768    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
769}
770impl Default for EscFailureFlags {
771    fn default() -> Self {
772        Self::DEFAULT
773    }
774}
775bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
776impl EstimatorStatusFlags {
777    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
778}
779impl Default for EstimatorStatusFlags {
780    fn default() -> Self {
781        Self::DEFAULT
782    }
783}
784#[cfg_attr(feature = "ts", derive(TS))]
785#[cfg_attr(feature = "ts", ts(export))]
786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
788#[cfg_attr(feature = "serde", serde(tag = "type"))]
789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
790#[repr(u32)]
791#[doc = "List of possible failure type to inject."]
792pub enum FailureType {
793    #[doc = "No failure injected, used to reset a previous failure."]
794    FAILURE_TYPE_OK = 0,
795    #[doc = "Sets unit off, so completely non-responsive."]
796    FAILURE_TYPE_OFF = 1,
797    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
798    FAILURE_TYPE_STUCK = 2,
799    #[doc = "Unit is reporting complete garbage."]
800    FAILURE_TYPE_GARBAGE = 3,
801    #[doc = "Unit is consistently wrong."]
802    FAILURE_TYPE_WRONG = 4,
803    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
804    FAILURE_TYPE_SLOW = 5,
805    #[doc = "Data of unit is delayed in time."]
806    FAILURE_TYPE_DELAYED = 6,
807    #[doc = "Unit is sometimes working, sometimes not."]
808    FAILURE_TYPE_INTERMITTENT = 7,
809}
810impl FailureType {
811    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
812}
813impl Default for FailureType {
814    fn default() -> Self {
815        Self::DEFAULT
816    }
817}
818#[cfg_attr(feature = "ts", derive(TS))]
819#[cfg_attr(feature = "ts", ts(export))]
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "List of possible units where failures can be injected."]
826pub enum FailureUnit {
827    FAILURE_UNIT_SENSOR_GYRO = 0,
828    FAILURE_UNIT_SENSOR_ACCEL = 1,
829    FAILURE_UNIT_SENSOR_MAG = 2,
830    FAILURE_UNIT_SENSOR_BARO = 3,
831    FAILURE_UNIT_SENSOR_GPS = 4,
832    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
833    FAILURE_UNIT_SENSOR_VIO = 6,
834    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
835    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
836    FAILURE_UNIT_SYSTEM_BATTERY = 100,
837    FAILURE_UNIT_SYSTEM_MOTOR = 101,
838    FAILURE_UNIT_SYSTEM_SERVO = 102,
839    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
840    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
841    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
842}
843impl FailureUnit {
844    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
845}
846impl Default for FailureUnit {
847    fn default() -> Self {
848        Self::DEFAULT
849    }
850}
851#[cfg_attr(feature = "ts", derive(TS))]
852#[cfg_attr(feature = "ts", ts(export))]
853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
855#[cfg_attr(feature = "serde", serde(tag = "type"))]
856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
857#[repr(u32)]
858pub enum FenceBreach {
859    #[doc = "No last fence breach"]
860    FENCE_BREACH_NONE = 0,
861    #[doc = "Breached minimum altitude"]
862    FENCE_BREACH_MINALT = 1,
863    #[doc = "Breached maximum altitude"]
864    FENCE_BREACH_MAXALT = 2,
865    #[doc = "Breached fence boundary"]
866    FENCE_BREACH_BOUNDARY = 3,
867}
868impl FenceBreach {
869    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
870}
871impl Default for FenceBreach {
872    fn default() -> Self {
873        Self::DEFAULT
874    }
875}
876#[cfg_attr(feature = "ts", derive(TS))]
877#[cfg_attr(feature = "ts", ts(export))]
878#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
880#[cfg_attr(feature = "serde", serde(tag = "type"))]
881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
882#[repr(u32)]
883#[doc = "Actions being taken to mitigate/prevent fence breach"]
884pub enum FenceMitigate {
885    #[doc = "Unknown"]
886    FENCE_MITIGATE_UNKNOWN = 0,
887    #[doc = "No actions being taken"]
888    FENCE_MITIGATE_NONE = 1,
889    #[doc = "Velocity limiting active to prevent breach"]
890    FENCE_MITIGATE_VEL_LIMIT = 2,
891}
892impl FenceMitigate {
893    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
894}
895impl Default for FenceMitigate {
896    fn default() -> Self {
897        Self::DEFAULT
898    }
899}
900#[cfg_attr(feature = "ts", derive(TS))]
901#[cfg_attr(feature = "ts", ts(export))]
902#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
904#[cfg_attr(feature = "serde", serde(tag = "type"))]
905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
906#[repr(u32)]
907#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
908pub enum FenceType {
909    #[doc = "Maximum altitude fence"]
910    FENCE_TYPE_ALT_MAX = 1,
911    #[doc = "Circle fence"]
912    FENCE_TYPE_CIRCLE = 2,
913    #[doc = "Polygon fence"]
914    FENCE_TYPE_POLYGON = 4,
915    #[doc = "Minimum altitude fence"]
916    FENCE_TYPE_ALT_MIN = 8,
917}
918impl FenceType {
919    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
920}
921impl Default for FenceType {
922    fn default() -> Self {
923        Self::DEFAULT
924    }
925}
926#[cfg_attr(feature = "ts", derive(TS))]
927#[cfg_attr(feature = "ts", ts(export))]
928#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
930#[cfg_attr(feature = "serde", serde(tag = "type"))]
931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
932#[repr(u32)]
933#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
934pub enum FirmwareVersionType {
935    #[doc = "development release"]
936    FIRMWARE_VERSION_TYPE_DEV = 0,
937    #[doc = "alpha release"]
938    FIRMWARE_VERSION_TYPE_ALPHA = 64,
939    #[doc = "beta release"]
940    FIRMWARE_VERSION_TYPE_BETA = 128,
941    #[doc = "release candidate"]
942    FIRMWARE_VERSION_TYPE_RC = 192,
943    #[doc = "official stable release"]
944    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
945}
946impl FirmwareVersionType {
947    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
948}
949impl Default for FirmwareVersionType {
950    fn default() -> Self {
951        Self::DEFAULT
952    }
953}
954bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "CONTROL_STATUS flags."] pub struct GcsControlStatusFlags : u8 { # [doc = "If set, this CONTROL_STATUS publishes the controlling GCS for the whole system. If unset, the CONTROL_STATUS indicates the controlling GCS for just the component emitting the message. Note that to request control of the system a GCS should send MAV_CMD_REQUEST_OPERATOR_CONTROL to the component emitting CONTROL_STATUS with this flag set."] const GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER = 1 ; # [doc = "Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover)."] const GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED = 2 ; } }
955impl GcsControlStatusFlags {
956    pub const DEFAULT: Self = Self::GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER;
957}
958impl Default for GcsControlStatusFlags {
959    fn default() -> Self {
960        Self::DEFAULT
961    }
962}
963bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
964impl GimbalDeviceCapFlags {
965    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
966}
967impl Default for GimbalDeviceCapFlags {
968    fn default() -> Self {
969        Self::DEFAULT
970    }
971}
972bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
973impl GimbalDeviceErrorFlags {
974    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
975}
976impl Default for GimbalDeviceErrorFlags {
977    fn default() -> Self {
978        Self::DEFAULT
979    }
980}
981bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
982impl GimbalDeviceFlags {
983    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
984}
985impl Default for GimbalDeviceFlags {
986    fn default() -> Self {
987        Self::DEFAULT
988    }
989}
990bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
991impl GimbalManagerCapFlags {
992    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
993}
994impl Default for GimbalManagerCapFlags {
995    fn default() -> Self {
996        Self::DEFAULT
997    }
998}
999bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1000impl GimbalManagerFlags {
1001    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1002}
1003impl Default for GimbalManagerFlags {
1004    fn default() -> Self {
1005        Self::DEFAULT
1006    }
1007}
1008#[cfg_attr(feature = "ts", derive(TS))]
1009#[cfg_attr(feature = "ts", ts(export))]
1010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1012#[cfg_attr(feature = "serde", serde(tag = "type"))]
1013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1014#[repr(u32)]
1015#[doc = "Signal authentication state in a GPS receiver."]
1016pub enum GpsAuthenticationState {
1017    #[doc = "The GPS receiver does not provide GPS signal authentication info."]
1018    GPS_AUTHENTICATION_STATE_UNKNOWN = 0,
1019    #[doc = "The GPS receiver is initializing signal authentication."]
1020    GPS_AUTHENTICATION_STATE_INITIALIZING = 1,
1021    #[doc = "The GPS receiver encountered an error while initializing signal authentication."]
1022    GPS_AUTHENTICATION_STATE_ERROR = 2,
1023    #[doc = "The GPS receiver has correctly authenticated all signals."]
1024    GPS_AUTHENTICATION_STATE_OK = 3,
1025    #[doc = "GPS signal authentication is disabled on the receiver."]
1026    GPS_AUTHENTICATION_STATE_DISABLED = 4,
1027}
1028impl GpsAuthenticationState {
1029    pub const DEFAULT: Self = Self::GPS_AUTHENTICATION_STATE_UNKNOWN;
1030}
1031impl Default for GpsAuthenticationState {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Type of GPS fix"]
1044pub enum GpsFixType {
1045    #[doc = "No GPS connected"]
1046    GPS_FIX_TYPE_NO_GPS = 0,
1047    #[doc = "No position information, GPS is connected"]
1048    GPS_FIX_TYPE_NO_FIX = 1,
1049    #[doc = "2D position"]
1050    GPS_FIX_TYPE_2D_FIX = 2,
1051    #[doc = "3D position"]
1052    GPS_FIX_TYPE_3D_FIX = 3,
1053    #[doc = "DGPS/SBAS aided 3D position"]
1054    GPS_FIX_TYPE_DGPS = 4,
1055    #[doc = "RTK float, 3D position"]
1056    GPS_FIX_TYPE_RTK_FLOAT = 5,
1057    #[doc = "RTK Fixed, 3D position"]
1058    GPS_FIX_TYPE_RTK_FIXED = 6,
1059    #[doc = "Static fixed, typically used for base stations"]
1060    GPS_FIX_TYPE_STATIC = 7,
1061    #[doc = "PPP, 3D position."]
1062    GPS_FIX_TYPE_PPP = 8,
1063}
1064impl GpsFixType {
1065    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1066}
1067impl Default for GpsFixType {
1068    fn default() -> Self {
1069        Self::DEFAULT
1070    }
1071}
1072bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1073impl GpsInputIgnoreFlags {
1074    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1075}
1076impl Default for GpsInputIgnoreFlags {
1077    fn default() -> Self {
1078        Self::DEFAULT
1079    }
1080}
1081#[cfg_attr(feature = "ts", derive(TS))]
1082#[cfg_attr(feature = "ts", ts(export))]
1083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1085#[cfg_attr(feature = "serde", serde(tag = "type"))]
1086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1087#[repr(u32)]
1088#[doc = "Signal jamming state in a GPS receiver."]
1089pub enum GpsJammingState {
1090    #[doc = "The GPS receiver does not provide GPS signal jamming info."]
1091    GPS_JAMMING_STATE_UNKNOWN = 0,
1092    #[doc = "The GPS receiver detected no signal jamming."]
1093    GPS_JAMMING_STATE_OK = 1,
1094    #[doc = "The GPS receiver detected and mitigated signal jamming."]
1095    GPS_JAMMING_STATE_MITIGATED = 2,
1096    #[doc = "The GPS receiver detected signal jamming."]
1097    GPS_JAMMING_STATE_DETECTED = 3,
1098}
1099impl GpsJammingState {
1100    pub const DEFAULT: Self = Self::GPS_JAMMING_STATE_UNKNOWN;
1101}
1102impl Default for GpsJammingState {
1103    fn default() -> Self {
1104        Self::DEFAULT
1105    }
1106}
1107#[cfg_attr(feature = "ts", derive(TS))]
1108#[cfg_attr(feature = "ts", ts(export))]
1109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1111#[cfg_attr(feature = "serde", serde(tag = "type"))]
1112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1113#[repr(u32)]
1114#[doc = "State of RAIM processing."]
1115pub enum GpsRaimState {
1116    #[doc = "RAIM capability is unknown."]
1117    GPS_RAIM_STATE_UNKNOWN = 0,
1118    #[doc = "RAIM is disabled."]
1119    GPS_RAIM_STATE_DISABLED = 1,
1120    #[doc = "RAIM integrity check was successful."]
1121    GPS_RAIM_STATE_OK = 2,
1122    #[doc = "RAIM integrity check failed."]
1123    GPS_RAIM_STATE_FAILED = 3,
1124}
1125impl GpsRaimState {
1126    pub const DEFAULT: Self = Self::GPS_RAIM_STATE_UNKNOWN;
1127}
1128impl Default for GpsRaimState {
1129    fn default() -> Self {
1130        Self::DEFAULT
1131    }
1132}
1133#[cfg_attr(feature = "ts", derive(TS))]
1134#[cfg_attr(feature = "ts", ts(export))]
1135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1137#[cfg_attr(feature = "serde", serde(tag = "type"))]
1138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1139#[repr(u32)]
1140#[doc = "Signal spoofing state in a GPS receiver."]
1141pub enum GpsSpoofingState {
1142    #[doc = "The GPS receiver does not provide GPS signal spoofing info."]
1143    GPS_SPOOFING_STATE_UNKNOWN = 0,
1144    #[doc = "The GPS receiver detected no signal spoofing."]
1145    GPS_SPOOFING_STATE_OK = 1,
1146    #[doc = "The GPS receiver detected and mitigated signal spoofing."]
1147    GPS_SPOOFING_STATE_MITIGATED = 2,
1148    #[doc = "The GPS receiver detected signal spoofing but still has a fix."]
1149    GPS_SPOOFING_STATE_DETECTED = 3,
1150}
1151impl GpsSpoofingState {
1152    pub const DEFAULT: Self = Self::GPS_SPOOFING_STATE_UNKNOWN;
1153}
1154impl Default for GpsSpoofingState {
1155    fn default() -> Self {
1156        Self::DEFAULT
1157    }
1158}
1159bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags indicating errors in a GPS receiver."] pub struct GpsSystemErrorFlags : u32 { # [doc = "There are problems with incoming correction streams."] const GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS = 1 ; # [doc = "There are problems with the configuration."] const GPS_SYSTEM_ERROR_CONFIGURATION = 2 ; # [doc = "There are problems with the software on the GPS receiver."] const GPS_SYSTEM_ERROR_SOFTWARE = 4 ; # [doc = "There are problems with an antenna connected to the GPS receiver."] const GPS_SYSTEM_ERROR_ANTENNA = 8 ; # [doc = "There are problems handling all incoming events."] const GPS_SYSTEM_ERROR_EVENT_CONGESTION = 16 ; # [doc = "The GPS receiver CPU is overloaded."] const GPS_SYSTEM_ERROR_CPU_OVERLOAD = 32 ; # [doc = "The GPS receiver is experiencing output congestion."] const GPS_SYSTEM_ERROR_OUTPUT_CONGESTION = 64 ; } }
1160impl GpsSystemErrorFlags {
1161    pub const DEFAULT: Self = Self::GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS;
1162}
1163impl Default for GpsSystemErrorFlags {
1164    fn default() -> Self {
1165        Self::DEFAULT
1166    }
1167}
1168#[cfg_attr(feature = "ts", derive(TS))]
1169#[cfg_attr(feature = "ts", ts(export))]
1170#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1172#[cfg_attr(feature = "serde", serde(tag = "type"))]
1173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1174#[repr(u32)]
1175#[doc = "Gripper actions."]
1176pub enum GripperActions {
1177    #[doc = "Gripper release cargo."]
1178    GRIPPER_ACTION_RELEASE = 0,
1179    #[doc = "Gripper grab onto cargo."]
1180    GRIPPER_ACTION_GRAB = 1,
1181}
1182impl GripperActions {
1183    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1184}
1185impl Default for GripperActions {
1186    fn default() -> Self {
1187        Self::DEFAULT
1188    }
1189}
1190bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1191impl HighresImuUpdatedFlags {
1192    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1193}
1194impl Default for HighresImuUpdatedFlags {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1200impl HilActuatorControlsFlags {
1201    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1202}
1203impl Default for HilActuatorControlsFlags {
1204    fn default() -> Self {
1205        Self::DEFAULT
1206    }
1207}
1208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1209impl HilSensorUpdatedFlags {
1210    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1211}
1212impl Default for HilSensorUpdatedFlags {
1213    fn default() -> Self {
1214        Self::DEFAULT
1215    }
1216}
1217bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1218impl HlFailureFlag {
1219    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1220}
1221impl Default for HlFailureFlag {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1227impl IlluminatorErrorFlags {
1228    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1229}
1230impl Default for IlluminatorErrorFlags {
1231    fn default() -> Self {
1232        Self::DEFAULT
1233    }
1234}
1235#[cfg_attr(feature = "ts", derive(TS))]
1236#[cfg_attr(feature = "ts", ts(export))]
1237#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1239#[cfg_attr(feature = "serde", serde(tag = "type"))]
1240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1241#[repr(u32)]
1242#[doc = "Modes of illuminator"]
1243pub enum IlluminatorMode {
1244    #[doc = "Illuminator mode is not specified/unknown"]
1245    ILLUMINATOR_MODE_UNKNOWN = 0,
1246    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1247    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1248    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1249    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1250}
1251impl IlluminatorMode {
1252    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1253}
1254impl Default for IlluminatorMode {
1255    fn default() -> Self {
1256        Self::DEFAULT
1257    }
1258}
1259#[cfg_attr(feature = "ts", derive(TS))]
1260#[cfg_attr(feature = "ts", ts(export))]
1261#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1263#[cfg_attr(feature = "serde", serde(tag = "type"))]
1264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1265#[repr(u32)]
1266#[doc = "Type of landing target"]
1267pub enum LandingTargetType {
1268    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1269    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1270    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1271    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1272    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1273    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1274    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1275    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1276}
1277impl LandingTargetType {
1278    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1279}
1280impl Default for LandingTargetType {
1281    fn default() -> Self {
1282        Self::DEFAULT
1283    }
1284}
1285#[cfg_attr(feature = "ts", derive(TS))]
1286#[cfg_attr(feature = "ts", ts(export))]
1287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1289#[cfg_attr(feature = "serde", serde(tag = "type"))]
1290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1291#[repr(u32)]
1292pub enum MagCalStatus {
1293    MAG_CAL_NOT_STARTED = 0,
1294    MAG_CAL_WAITING_TO_START = 1,
1295    MAG_CAL_RUNNING_STEP_ONE = 2,
1296    MAG_CAL_RUNNING_STEP_TWO = 3,
1297    MAG_CAL_SUCCESS = 4,
1298    MAG_CAL_FAILED = 5,
1299    MAG_CAL_BAD_ORIENTATION = 6,
1300    MAG_CAL_BAD_RADIUS = 7,
1301}
1302impl MagCalStatus {
1303    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1304}
1305impl Default for MagCalStatus {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317pub enum MavArmAuthDeniedReason {
1318    #[doc = "Not a specific reason"]
1319    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1320    #[doc = "Authorizer will send the error as string to GCS"]
1321    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1322    #[doc = "At least one waypoint have a invalid value"]
1323    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1324    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1325    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1326    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1327    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1328    #[doc = "Weather is not good to fly"]
1329    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1330}
1331impl MavArmAuthDeniedReason {
1332    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1333}
1334impl Default for MavArmAuthDeniedReason {
1335    fn default() -> Self {
1336        Self::DEFAULT
1337    }
1338}
1339#[cfg_attr(feature = "ts", derive(TS))]
1340#[cfg_attr(feature = "ts", ts(export))]
1341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1343#[cfg_attr(feature = "serde", serde(tag = "type"))]
1344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1345#[repr(u32)]
1346#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1347pub enum MavAutopilot {
1348    #[doc = "Generic autopilot, full support for everything"]
1349    MAV_AUTOPILOT_GENERIC = 0,
1350    #[doc = "Reserved for future use."]
1351    MAV_AUTOPILOT_RESERVED = 1,
1352    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1353    MAV_AUTOPILOT_SLUGS = 2,
1354    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1355    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1356    #[doc = "OpenPilot, <http://openpilot.org>"]
1357    MAV_AUTOPILOT_OPENPILOT = 4,
1358    #[doc = "Generic autopilot only supporting simple waypoints"]
1359    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1360    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1361    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1362    #[doc = "Generic autopilot supporting the full mission command set"]
1363    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1364    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1365    MAV_AUTOPILOT_INVALID = 8,
1366    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1367    MAV_AUTOPILOT_PPZ = 9,
1368    #[doc = "UAV Dev Board"]
1369    MAV_AUTOPILOT_UDB = 10,
1370    #[doc = "FlexiPilot"]
1371    MAV_AUTOPILOT_FP = 11,
1372    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1373    MAV_AUTOPILOT_PX4 = 12,
1374    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1375    MAV_AUTOPILOT_SMACCMPILOT = 13,
1376    #[doc = "AutoQuad -- <http://autoquad.org>"]
1377    MAV_AUTOPILOT_AUTOQUAD = 14,
1378    #[doc = "Armazila -- <http://armazila.com>"]
1379    MAV_AUTOPILOT_ARMAZILA = 15,
1380    #[doc = "Aerob -- <http://aerob.ru>"]
1381    MAV_AUTOPILOT_AEROB = 16,
1382    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1383    MAV_AUTOPILOT_ASLUAV = 17,
1384    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1385    MAV_AUTOPILOT_SMARTAP = 18,
1386    #[doc = "AirRails - <http://uaventure.com>"]
1387    MAV_AUTOPILOT_AIRRAILS = 19,
1388    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1389    MAV_AUTOPILOT_REFLEX = 20,
1390}
1391impl MavAutopilot {
1392    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1393}
1394impl Default for MavAutopilot {
1395    fn default() -> Self {
1396        Self::DEFAULT
1397    }
1398}
1399#[cfg_attr(feature = "ts", derive(TS))]
1400#[cfg_attr(feature = "ts", ts(export))]
1401#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1403#[cfg_attr(feature = "serde", serde(tag = "type"))]
1404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1405#[repr(u32)]
1406#[doc = "Enumeration for battery charge states."]
1407pub enum MavBatteryChargeState {
1408    #[doc = "Low battery state is not provided"]
1409    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1410    #[doc = "Battery is not in low state. Normal operation."]
1411    MAV_BATTERY_CHARGE_STATE_OK = 1,
1412    #[doc = "Battery state is low, warn and monitor close."]
1413    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1414    #[doc = "Battery state is critical, return or abort immediately."]
1415    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1416    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1417    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1418    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1419    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1420    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1421    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1422    #[doc = "Battery is charging."]
1423    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1424}
1425impl MavBatteryChargeState {
1426    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1427}
1428impl Default for MavBatteryChargeState {
1429    fn default() -> Self {
1430        Self::DEFAULT
1431    }
1432}
1433bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1434impl MavBatteryFault {
1435    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1436}
1437impl Default for MavBatteryFault {
1438    fn default() -> Self {
1439        Self::DEFAULT
1440    }
1441}
1442#[cfg_attr(feature = "ts", derive(TS))]
1443#[cfg_attr(feature = "ts", ts(export))]
1444#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1446#[cfg_attr(feature = "serde", serde(tag = "type"))]
1447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1448#[repr(u32)]
1449#[doc = "Enumeration of battery functions"]
1450pub enum MavBatteryFunction {
1451    #[doc = "Battery function is unknown"]
1452    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1453    #[doc = "Battery supports all flight systems"]
1454    MAV_BATTERY_FUNCTION_ALL = 1,
1455    #[doc = "Battery for the propulsion system"]
1456    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1457    #[doc = "Avionics battery"]
1458    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1459    #[doc = "Payload battery"]
1460    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1461}
1462impl MavBatteryFunction {
1463    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1464}
1465impl Default for MavBatteryFunction {
1466    fn default() -> Self {
1467        Self::DEFAULT
1468    }
1469}
1470#[cfg_attr(feature = "ts", derive(TS))]
1471#[cfg_attr(feature = "ts", ts(export))]
1472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1474#[cfg_attr(feature = "serde", serde(tag = "type"))]
1475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1476#[repr(u32)]
1477#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1478pub enum MavBatteryMode {
1479    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1480    MAV_BATTERY_MODE_UNKNOWN = 0,
1481    #[doc = "Battery is auto discharging (towards storage level)."]
1482    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1483    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1484    MAV_BATTERY_MODE_HOT_SWAP = 2,
1485}
1486impl MavBatteryMode {
1487    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1488}
1489impl Default for MavBatteryMode {
1490    fn default() -> Self {
1491        Self::DEFAULT
1492    }
1493}
1494bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Battery status flags for fault, health and state indication."] pub struct MavBatteryStatusFlags : u32 { # [doc = "The battery is not ready to use (fly).           Set if the battery has faults or other conditions that make it unsafe to fly with.           Note: It will be the logical OR of other status bits (chosen by the manufacturer/integrator)."] const MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE = 1 ; # [doc = "Battery is charging."] const MAV_BATTERY_STATUS_FLAGS_CHARGING = 2 ; # [doc = "Battery is cell balancing (during charging).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE may be set)."] const MAV_BATTERY_STATUS_FLAGS_CELL_BALANCING = 4 ; # [doc = "Battery cells are not balanced.           Not ready to use."] const MAV_BATTERY_STATUS_FLAGS_FAULT_CELL_IMBALANCE = 8 ; # [doc = "Battery is auto discharging (towards storage level).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE would be set)."] const MAV_BATTERY_STATUS_FLAGS_AUTO_DISCHARGING = 16 ; # [doc = "Battery requires service (not safe to fly).           This is set at vendor discretion.           It is likely to be set for most faults, and may also be set according to a maintenance schedule (such as age, or number of recharge cycles, etc.)."] const MAV_BATTERY_STATUS_FLAGS_REQUIRES_SERVICE = 32 ; # [doc = "Battery is faulty and cannot be repaired (not safe to fly).           This is set at vendor discretion.           The battery should be disposed of safely."] const MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY = 64 ; # [doc = "Automatic battery protection monitoring is enabled.           When enabled, the system will monitor for certain kinds of faults, such as cells being over-voltage.           If a fault is triggered then and protections are enabled then a safety fault (MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM) will be set and power from the battery will be stopped.           Note that battery protection monitoring should only be enabled when the vehicle is landed. Once the vehicle is armed, or starts moving, the protections should be disabled to prevent false positives from disabling the output."] const MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED = 128 ; # [doc = "The battery fault protection system had detected a fault and cut all power from the battery.           This will only trigger if MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED is set.           Other faults like MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT may also be set, indicating the cause of the protection fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM = 256 ; # [doc = "One or more cells are above their maximum voltage rating."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT = 512 ; # [doc = "One or more cells are below their minimum voltage rating.           A battery that had deep-discharged might be irrepairably damaged, and set both MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT and MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT = 1024 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_TEMPERATURE = 2048 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_TEMPERATURE = 4096 ; # [doc = "Over-current fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_CURRENT = 8192 ; # [doc = "Short circuit event detected.           The battery may or may not be safe to use (check other flags)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_SHORT_CIRCUIT = 16384 ; # [doc = "Voltage not compatible with power rail voltage (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_VOLTAGE = 32768 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_FIRMWARE = 65536 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 131072 ; # [doc = "Battery capacity_consumed and capacity_remaining values are relative to a full battery (they sum to the total capacity of the battery).           This flag would be set for a smart battery that can accurately determine its remaining charge across vehicle reboots and discharge/recharge cycles.           If unset the capacity_consumed indicates the consumption since vehicle power-on, as measured using a power monitor. The capacity_remaining, if provided, indicates the estimated remaining capacity on the assumption that the battery was full on vehicle boot.           If unset a GCS is recommended to advise that users fully charge the battery on power on."] const MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL = 262144 ; # [doc = "Reserved (not used). If set, this will indicate that an additional status field exists for higher status values."] const MAV_BATTERY_STATUS_FLAGS_EXTENDED = 2147483648 ; } }
1495impl MavBatteryStatusFlags {
1496    pub const DEFAULT: Self = Self::MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE;
1497}
1498impl Default for MavBatteryStatusFlags {
1499    fn default() -> Self {
1500        Self::DEFAULT
1501    }
1502}
1503#[cfg_attr(feature = "ts", derive(TS))]
1504#[cfg_attr(feature = "ts", ts(export))]
1505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1507#[cfg_attr(feature = "serde", serde(tag = "type"))]
1508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1509#[repr(u32)]
1510#[doc = "Enumeration of battery types"]
1511pub enum MavBatteryType {
1512    #[doc = "Not specified."]
1513    MAV_BATTERY_TYPE_UNKNOWN = 0,
1514    #[doc = "Lithium polymer battery"]
1515    MAV_BATTERY_TYPE_LIPO = 1,
1516    #[doc = "Lithium-iron-phosphate battery"]
1517    MAV_BATTERY_TYPE_LIFE = 2,
1518    #[doc = "Lithium-ION battery"]
1519    MAV_BATTERY_TYPE_LION = 3,
1520    #[doc = "Nickel metal hydride battery"]
1521    MAV_BATTERY_TYPE_NIMH = 4,
1522}
1523impl MavBatteryType {
1524    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1525}
1526impl Default for MavBatteryType {
1527    fn default() -> Self {
1528        Self::DEFAULT
1529    }
1530}
1531#[cfg_attr(feature = "ts", derive(TS))]
1532#[cfg_attr(feature = "ts", ts(export))]
1533#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1535#[cfg_attr(feature = "serde", serde(tag = "type"))]
1536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1537#[repr(u32)]
1538#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1539pub enum MavCmd {
1540    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1541    MAV_CMD_NAV_WAYPOINT = 16,
1542    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1543    MAV_CMD_NAV_LOITER_UNLIM = 17,
1544    #[doc = "Loiter around this waypoint for X turns"]
1545    MAV_CMD_NAV_LOITER_TURNS = 18,
1546    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1547    MAV_CMD_NAV_LOITER_TIME = 19,
1548    #[doc = "Return to launch location"]
1549    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1550    #[doc = "Land at location."]
1551    MAV_CMD_NAV_LAND = 21,
1552    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1553    MAV_CMD_NAV_TAKEOFF = 22,
1554    #[doc = "Land at local position (local frame only)"]
1555    MAV_CMD_NAV_LAND_LOCAL = 23,
1556    #[doc = "Takeoff from local position (local frame only)"]
1557    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1558    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1559    MAV_CMD_NAV_FOLLOW = 25,
1560    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1561    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1562    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1563    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1564    #[doc = "Begin following a target"]
1565    MAV_CMD_DO_FOLLOW = 32,
1566    #[doc = "Reposition the MAV after a follow target command has been sent"]
1567    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1568    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1569    MAV_CMD_DO_ORBIT = 34,
1570    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1571    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1572    MAV_CMD_NAV_ROI = 80,
1573    #[doc = "Control autonomous path planning on the MAV."]
1574    MAV_CMD_NAV_PATHPLANNING = 81,
1575    #[doc = "Navigate to waypoint using a spline path."]
1576    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1577    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1578    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1579    #[doc = "Land using VTOL mode"]
1580    MAV_CMD_NAV_VTOL_LAND = 85,
1581    #[doc = "hand control over to an external controller"]
1582    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1583    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1584    MAV_CMD_NAV_DELAY = 93,
1585    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1586    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1587    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1588    MAV_CMD_NAV_LAST = 95,
1589    #[doc = "Delay mission state machine."]
1590    MAV_CMD_CONDITION_DELAY = 112,
1591    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1592    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1593    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1594    MAV_CMD_CONDITION_DISTANCE = 114,
1595    #[doc = "Reach a certain target angle."]
1596    MAV_CMD_CONDITION_YAW = 115,
1597    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1598    MAV_CMD_CONDITION_LAST = 159,
1599    #[doc = "Set system mode."]
1600    MAV_CMD_DO_SET_MODE = 176,
1601    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1602    MAV_CMD_DO_JUMP = 177,
1603    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1604    MAV_CMD_DO_CHANGE_SPEED = 178,
1605    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1606    MAV_CMD_DO_SET_HOME = 179,
1607    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1608    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1609    MAV_CMD_DO_SET_PARAMETER = 180,
1610    #[doc = "Set a relay to a condition."]
1611    MAV_CMD_DO_SET_RELAY = 181,
1612    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1613    MAV_CMD_DO_REPEAT_RELAY = 182,
1614    #[doc = "Set a servo to a desired PWM value."]
1615    MAV_CMD_DO_SET_SERVO = 183,
1616    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1617    MAV_CMD_DO_REPEAT_SERVO = 184,
1618    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1619    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1620    #[doc = "Change altitude set point."]
1621    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1622    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1623    MAV_CMD_DO_SET_ACTUATOR = 187,
1624    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1625    MAV_CMD_DO_RETURN_PATH_START = 188,
1626    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1627    MAV_CMD_DO_LAND_START = 189,
1628    #[doc = "Mission command to perform a landing from a rally point."]
1629    MAV_CMD_DO_RALLY_LAND = 190,
1630    #[doc = "Mission command to safely abort an autonomous landing."]
1631    MAV_CMD_DO_GO_AROUND = 191,
1632    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1633    MAV_CMD_DO_REPOSITION = 192,
1634    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1635    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1636    #[doc = "Set moving direction to forward or reverse."]
1637    MAV_CMD_DO_SET_REVERSE = 194,
1638    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1639    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1640    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1641    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1642    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1643    MAV_CMD_DO_SET_ROI_NONE = 197,
1644    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1645    MAV_CMD_DO_SET_ROI_SYSID = 198,
1646    #[doc = "Control onboard camera system."]
1647    MAV_CMD_DO_CONTROL_VIDEO = 200,
1648    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1649    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1650    MAV_CMD_DO_SET_ROI = 201,
1651    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1652    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1653    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1654    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1655    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1656    #[doc = "Mission command to configure a camera or antenna mount"]
1657    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1658    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1659    #[doc = "Mission command to control a camera or antenna mount"]
1660    MAV_CMD_DO_MOUNT_CONTROL = 205,
1661    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1662    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1663    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1664    MAV_CMD_DO_FENCE_ENABLE = 207,
1665    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1666    MAV_CMD_DO_PARACHUTE = 208,
1667    #[doc = "Command to perform motor test."]
1668    MAV_CMD_DO_MOTOR_TEST = 209,
1669    #[doc = "Change to/from inverted flight."]
1670    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1671    #[doc = "Mission command to operate a gripper."]
1672    MAV_CMD_DO_GRIPPER = 211,
1673    #[doc = "Enable/disable autotune."]
1674    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1675    #[doc = "Sets a desired vehicle turn angle and speed change."]
1676    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1677    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1678    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1679    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1680    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1681    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1682    #[doc = "set id of master controller"]
1683    MAV_CMD_DO_GUIDED_MASTER = 221,
1684    #[doc = "Set limits for external control"]
1685    MAV_CMD_DO_GUIDED_LIMITS = 222,
1686    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1687    MAV_CMD_DO_ENGINE_CONTROL = 223,
1688    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1689    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1690    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1691    MAV_CMD_DO_LAST = 240,
1692    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1693    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1694    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1695    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1696    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1697    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1698    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1699    MAV_CMD_PREFLIGHT_STORAGE = 245,
1700    #[doc = "Request the reboot or shutdown of system components."]
1701    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1702    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1703    MAV_CMD_OVERRIDE_GOTO = 252,
1704    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1705    MAV_CMD_OBLIQUE_SURVEY = 260,
1706    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1707    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1708    #[doc = "start running a mission"]
1709    MAV_CMD_MISSION_START = 300,
1710    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1711    MAV_CMD_ACTUATOR_TEST = 310,
1712    #[doc = "Actuator configuration command."]
1713    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1714    #[doc = "Arms / Disarms a component"]
1715    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1716    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1717    MAV_CMD_RUN_PREARM_CHECKS = 401,
1718    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1719    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1720    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1721    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1722    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1723    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1724    MAV_CMD_GET_HOME_POSITION = 410,
1725    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1726    MAV_CMD_INJECT_FAILURE = 420,
1727    #[doc = "Starts receiver pairing."]
1728    MAV_CMD_START_RX_PAIR = 500,
1729    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1730    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1731    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1732    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1733    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1734    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1735    MAV_CMD_REQUEST_MESSAGE = 512,
1736    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1737    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1738    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1739    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1740    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1741    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1742    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1743    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1744    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1745    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1746    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1747    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1748    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1749    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1750    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1751    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1752    MAV_CMD_STORAGE_FORMAT = 526,
1753    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1754    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1755    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1756    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1757    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1758    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1759    #[doc = "Reset all camera settings to Factory Default"]
1760    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1761    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1762    MAV_CMD_SET_CAMERA_MODE = 530,
1763    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1764    MAV_CMD_SET_CAMERA_ZOOM = 531,
1765    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1766    MAV_CMD_SET_CAMERA_FOCUS = 532,
1767    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1768    MAV_CMD_SET_STORAGE_USAGE = 533,
1769    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1770    MAV_CMD_SET_CAMERA_SOURCE = 534,
1771    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1772    MAV_CMD_JUMP_TAG = 600,
1773    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1774    MAV_CMD_DO_JUMP_TAG = 601,
1775    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1776    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1777    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1778    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1779    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1780    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1781    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1782    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1783    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1784    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1785    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1786    #[doc = "Enable or disable on-board camera triggering system."]
1787    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1788    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1789    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1790    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1791    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1792    #[doc = "Stops ongoing tracking."]
1793    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1794    #[doc = "Starts video capture (recording)."]
1795    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1796    #[doc = "Stop the current video capture (recording)."]
1797    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1798    #[doc = "Start video streaming"]
1799    MAV_CMD_VIDEO_START_STREAMING = 2502,
1800    #[doc = "Stop the given video stream"]
1801    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1802    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1803    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1804    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1805    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1806    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1807    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1808    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1809    MAV_CMD_LOGGING_START = 2510,
1810    #[doc = "Request to stop streaming log data over MAVLink"]
1811    MAV_CMD_LOGGING_STOP = 2511,
1812    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1813    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1814    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1815    #[doc = "Create a panorama at the current position"]
1816    MAV_CMD_PANORAMA_CREATE = 2800,
1817    #[doc = "Request VTOL transition"]
1818    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1819    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1820    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1821    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1822    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1823    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1824    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1825    #[doc = "Delay mission state machine until gate has been reached."]
1826    MAV_CMD_CONDITION_GATE = 4501,
1827    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1828    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1829    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1830    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1831    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1832    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1833    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1834    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1835    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1836    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1837    #[doc = "Rally point. You can have multiple rally points defined."]
1838    MAV_CMD_NAV_RALLY_POINT = 5100,
1839    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1840    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1841    #[doc = "Change state of safety switch."]
1842    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1843    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1844    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1845    #[deprecated = "  (Deprecated since 2021-06)"]
1846    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1847    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1848    #[deprecated = "  (Deprecated since 2021-06)"]
1849    #[doc = "Control the payload deployment."]
1850    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1851    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1852    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1853    #[doc = "Command to operate winch."]
1854    MAV_CMD_DO_WINCH = 42600,
1855    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1856    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1857    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1858    MAV_CMD_WAYPOINT_USER_1 = 31000,
1859    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1860    MAV_CMD_WAYPOINT_USER_2 = 31001,
1861    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1862    MAV_CMD_WAYPOINT_USER_3 = 31002,
1863    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1864    MAV_CMD_WAYPOINT_USER_4 = 31003,
1865    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1866    MAV_CMD_WAYPOINT_USER_5 = 31004,
1867    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1868    MAV_CMD_SPATIAL_USER_1 = 31005,
1869    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1870    MAV_CMD_SPATIAL_USER_2 = 31006,
1871    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1872    MAV_CMD_SPATIAL_USER_3 = 31007,
1873    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1874    MAV_CMD_SPATIAL_USER_4 = 31008,
1875    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1876    MAV_CMD_SPATIAL_USER_5 = 31009,
1877    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1878    MAV_CMD_USER_1 = 31010,
1879    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1880    MAV_CMD_USER_2 = 31011,
1881    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1882    MAV_CMD_USER_3 = 31012,
1883    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1884    MAV_CMD_USER_4 = 31013,
1885    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1886    MAV_CMD_USER_5 = 31014,
1887    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1888    MAV_CMD_CAN_FORWARD = 32000,
1889    #[doc = "Fly a figure eight path as defined by the parameters.           Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values.           The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation.           This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED).           Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading)."]
1890    MAV_CMD_DO_FIGURE_EIGHT = 35,
1891    #[doc = "Request a target system to start an upgrade of one (or all) of its components.           For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller.           The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation.           Command protocol information: <https://mavlink.io/en/services/command.html>."]
1892    MAV_CMD_DO_UPGRADE = 247,
1893    #[doc = "Allows setting an AT S command of an SiK radio."]
1894    MAV_CMD_SET_AT_S_PARAM = 550,
1895    #[doc = "Set system and component id.           This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id.           Recipients must reject command addressed to broadcast system ID."]
1896    MAV_CMD_DO_SET_SYS_CMP_ID = 610,
1897    #[doc = "Sets the GNSS coordinates of the vehicle local origin (0,0,0) position.           Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed.           This enables transform between the local coordinate frame and the global (GNSS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor.           This command supersedes SET_GPS_GLOBAL_ORIGIN.           Should be sent in a COMMAND_INT (Expected frame is MAV_FRAME_GLOBAL, and this should be assumed when sent in COMMAND_LONG)."]
1898    MAV_CMD_DO_SET_GLOBAL_ORIGIN = 611,
1899    #[doc = "Used to manually set/unset emergency status for remote id.           This is for compliance with MOC ASTM docs, specifically F358 section 7.7: \"Emergency Status Indicator\".           The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred.           See <https://mavlink.io/en/services/opendroneid.html> for more information."]
1900    MAV_CMD_ODID_SET_EMERGENCY = 12900,
1901    #[doc = "Set an external estimate of wind direction and speed.           This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself."]
1902    MAV_CMD_EXTERNAL_WIND_ESTIMATE = 43004,
1903    #[doc = "Request GCS control of a system (or of a specific component in a system).            A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.           Commands from other systems should be rejected with MAV_RESULT_FAILED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted).           Command-like messages should be ignored (or rejected if that is supported by their associated protocol).            GCS control of the whole system is managed via a single component that we will refer to here as the \"system manager component\".           This component streams the CONTROL_STATUS message and sets the GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER flag.           Other components in the system should monitor for the CONTROL_STATUS message with this flag, and set their controlling GCS to match its published system id.           A GCS that wants to control the system should also monitor for the same message and flag, and address the MAV_CMD_REQUEST_OPERATOR_CONTROL to its component id.           Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER set).            The MAV_CMD_REQUEST_OPERATOR_CONTROL command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.            The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED.           The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.            If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_FAILED.           The system manager component should then send this same command to the current owning GCS in order to notify of the request.           The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.           In case it choses to re-request control with takeover bit set to allow permission, requestor GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requestor GCS will need repeat the request if still interested in getting control.           Note that the pilots of both GCS should co-ordinate safe handover offline.            Note that in most systems the only controlled component will be the \"system manager component\", and that will be the autopilot.           However separate GCS control of a particular component is also permitted, if supported by the component.           In this case the GCS will address MAV_CMD_REQUEST_OPERATOR_CONTROL to the specific component it wants to control.           The component will then stream CONTROL_STATUS for its controlling GCS (it must not set GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER).           The component should fall back to the system GCS (if any) when it is not directly controlled, and may stop emitting CONTROL_STATUS.           The flow is otherwise the same as for requesting control over the whole system."]
1904    MAV_CMD_REQUEST_OPERATOR_CONTROL = 32100,
1905}
1906impl MavCmd {
1907    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1908}
1909impl Default for MavCmd {
1910    fn default() -> Self {
1911        Self::DEFAULT
1912    }
1913}
1914#[cfg_attr(feature = "ts", derive(TS))]
1915#[cfg_attr(feature = "ts", ts(export))]
1916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1918#[cfg_attr(feature = "serde", serde(tag = "type"))]
1919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1920#[repr(u32)]
1921#[doc = "Possible actions an aircraft can take to avoid a collision."]
1922pub enum MavCollisionAction {
1923    #[doc = "Ignore any potential collisions"]
1924    MAV_COLLISION_ACTION_NONE = 0,
1925    #[doc = "Report potential collision"]
1926    MAV_COLLISION_ACTION_REPORT = 1,
1927    #[doc = "Ascend or Descend to avoid threat"]
1928    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1929    #[doc = "Move horizontally to avoid threat"]
1930    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1931    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1932    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1933    #[doc = "Aircraft to fly directly back to its launch point"]
1934    MAV_COLLISION_ACTION_RTL = 5,
1935    #[doc = "Aircraft to stop in place"]
1936    MAV_COLLISION_ACTION_HOVER = 6,
1937}
1938impl MavCollisionAction {
1939    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1940}
1941impl Default for MavCollisionAction {
1942    fn default() -> Self {
1943        Self::DEFAULT
1944    }
1945}
1946#[cfg_attr(feature = "ts", derive(TS))]
1947#[cfg_attr(feature = "ts", ts(export))]
1948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1950#[cfg_attr(feature = "serde", serde(tag = "type"))]
1951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1952#[repr(u32)]
1953#[doc = "Source of information about this collision."]
1954pub enum MavCollisionSrc {
1955    #[doc = "ID field references ADSB_VEHICLE packets"]
1956    MAV_COLLISION_SRC_ADSB = 0,
1957    #[doc = "ID field references MAVLink SRC ID"]
1958    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1959}
1960impl MavCollisionSrc {
1961    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1962}
1963impl Default for MavCollisionSrc {
1964    fn default() -> Self {
1965        Self::DEFAULT
1966    }
1967}
1968#[cfg_attr(feature = "ts", derive(TS))]
1969#[cfg_attr(feature = "ts", ts(export))]
1970#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1972#[cfg_attr(feature = "serde", serde(tag = "type"))]
1973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1974#[repr(u32)]
1975#[doc = "Aircraft-rated danger from this threat."]
1976pub enum MavCollisionThreatLevel {
1977    #[doc = "Not a threat"]
1978    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1979    #[doc = "Craft is mildly concerned about this threat"]
1980    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1981    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1982    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1983}
1984impl MavCollisionThreatLevel {
1985    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1986}
1987impl Default for MavCollisionThreatLevel {
1988    fn default() -> Self {
1989        Self::DEFAULT
1990    }
1991}
1992#[cfg_attr(feature = "ts", derive(TS))]
1993#[cfg_attr(feature = "ts", ts(export))]
1994#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1996#[cfg_attr(feature = "serde", serde(tag = "type"))]
1997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1998#[repr(u32)]
1999#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2000pub enum MavComponent {
2001    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2002    MAV_COMP_ID_ALL = 0,
2003    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2004    MAV_COMP_ID_AUTOPILOT1 = 1,
2005    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2006    MAV_COMP_ID_USER1 = 25,
2007    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2008    MAV_COMP_ID_USER2 = 26,
2009    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2010    MAV_COMP_ID_USER3 = 27,
2011    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2012    MAV_COMP_ID_USER4 = 28,
2013    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2014    MAV_COMP_ID_USER5 = 29,
2015    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2016    MAV_COMP_ID_USER6 = 30,
2017    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2018    MAV_COMP_ID_USER7 = 31,
2019    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2020    MAV_COMP_ID_USER8 = 32,
2021    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2022    MAV_COMP_ID_USER9 = 33,
2023    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2024    MAV_COMP_ID_USER10 = 34,
2025    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2026    MAV_COMP_ID_USER11 = 35,
2027    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2028    MAV_COMP_ID_USER12 = 36,
2029    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2030    MAV_COMP_ID_USER13 = 37,
2031    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2032    MAV_COMP_ID_USER14 = 38,
2033    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2034    MAV_COMP_ID_USER15 = 39,
2035    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2036    MAV_COMP_ID_USER16 = 40,
2037    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2038    MAV_COMP_ID_USER17 = 41,
2039    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2040    MAV_COMP_ID_USER18 = 42,
2041    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2042    MAV_COMP_ID_USER19 = 43,
2043    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2044    MAV_COMP_ID_USER20 = 44,
2045    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2046    MAV_COMP_ID_USER21 = 45,
2047    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2048    MAV_COMP_ID_USER22 = 46,
2049    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2050    MAV_COMP_ID_USER23 = 47,
2051    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2052    MAV_COMP_ID_USER24 = 48,
2053    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2054    MAV_COMP_ID_USER25 = 49,
2055    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2056    MAV_COMP_ID_USER26 = 50,
2057    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2058    MAV_COMP_ID_USER27 = 51,
2059    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2060    MAV_COMP_ID_USER28 = 52,
2061    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2062    MAV_COMP_ID_USER29 = 53,
2063    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2064    MAV_COMP_ID_USER30 = 54,
2065    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2066    MAV_COMP_ID_USER31 = 55,
2067    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2068    MAV_COMP_ID_USER32 = 56,
2069    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2070    MAV_COMP_ID_USER33 = 57,
2071    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2072    MAV_COMP_ID_USER34 = 58,
2073    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2074    MAV_COMP_ID_USER35 = 59,
2075    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2076    MAV_COMP_ID_USER36 = 60,
2077    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2078    MAV_COMP_ID_USER37 = 61,
2079    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2080    MAV_COMP_ID_USER38 = 62,
2081    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2082    MAV_COMP_ID_USER39 = 63,
2083    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2084    MAV_COMP_ID_USER40 = 64,
2085    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2086    MAV_COMP_ID_USER41 = 65,
2087    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2088    MAV_COMP_ID_USER42 = 66,
2089    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2090    MAV_COMP_ID_USER43 = 67,
2091    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2092    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2093    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2094    MAV_COMP_ID_USER45 = 69,
2095    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2096    MAV_COMP_ID_USER46 = 70,
2097    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2098    MAV_COMP_ID_USER47 = 71,
2099    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2100    MAV_COMP_ID_USER48 = 72,
2101    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2102    MAV_COMP_ID_USER49 = 73,
2103    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2104    MAV_COMP_ID_USER50 = 74,
2105    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2106    MAV_COMP_ID_USER51 = 75,
2107    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2108    MAV_COMP_ID_USER52 = 76,
2109    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2110    MAV_COMP_ID_USER53 = 77,
2111    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2112    MAV_COMP_ID_USER54 = 78,
2113    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2114    MAV_COMP_ID_USER55 = 79,
2115    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2116    MAV_COMP_ID_USER56 = 80,
2117    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2118    MAV_COMP_ID_USER57 = 81,
2119    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2120    MAV_COMP_ID_USER58 = 82,
2121    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2122    MAV_COMP_ID_USER59 = 83,
2123    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2124    MAV_COMP_ID_USER60 = 84,
2125    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2126    MAV_COMP_ID_USER61 = 85,
2127    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2128    MAV_COMP_ID_USER62 = 86,
2129    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2130    MAV_COMP_ID_USER63 = 87,
2131    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2132    MAV_COMP_ID_USER64 = 88,
2133    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2134    MAV_COMP_ID_USER65 = 89,
2135    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2136    MAV_COMP_ID_USER66 = 90,
2137    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2138    MAV_COMP_ID_USER67 = 91,
2139    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2140    MAV_COMP_ID_USER68 = 92,
2141    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2142    MAV_COMP_ID_USER69 = 93,
2143    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2144    MAV_COMP_ID_USER70 = 94,
2145    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2146    MAV_COMP_ID_USER71 = 95,
2147    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2148    MAV_COMP_ID_USER72 = 96,
2149    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2150    MAV_COMP_ID_USER73 = 97,
2151    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2152    MAV_COMP_ID_USER74 = 98,
2153    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2154    MAV_COMP_ID_USER75 = 99,
2155    #[doc = "Camera #1."]
2156    MAV_COMP_ID_CAMERA = 100,
2157    #[doc = "Camera #2."]
2158    MAV_COMP_ID_CAMERA2 = 101,
2159    #[doc = "Camera #3."]
2160    MAV_COMP_ID_CAMERA3 = 102,
2161    #[doc = "Camera #4."]
2162    MAV_COMP_ID_CAMERA4 = 103,
2163    #[doc = "Camera #5."]
2164    MAV_COMP_ID_CAMERA5 = 104,
2165    #[doc = "Camera #6."]
2166    MAV_COMP_ID_CAMERA6 = 105,
2167    #[doc = "Servo #1."]
2168    MAV_COMP_ID_SERVO1 = 140,
2169    #[doc = "Servo #2."]
2170    MAV_COMP_ID_SERVO2 = 141,
2171    #[doc = "Servo #3."]
2172    MAV_COMP_ID_SERVO3 = 142,
2173    #[doc = "Servo #4."]
2174    MAV_COMP_ID_SERVO4 = 143,
2175    #[doc = "Servo #5."]
2176    MAV_COMP_ID_SERVO5 = 144,
2177    #[doc = "Servo #6."]
2178    MAV_COMP_ID_SERVO6 = 145,
2179    #[doc = "Servo #7."]
2180    MAV_COMP_ID_SERVO7 = 146,
2181    #[doc = "Servo #8."]
2182    MAV_COMP_ID_SERVO8 = 147,
2183    #[doc = "Servo #9."]
2184    MAV_COMP_ID_SERVO9 = 148,
2185    #[doc = "Servo #10."]
2186    MAV_COMP_ID_SERVO10 = 149,
2187    #[doc = "Servo #11."]
2188    MAV_COMP_ID_SERVO11 = 150,
2189    #[doc = "Servo #12."]
2190    MAV_COMP_ID_SERVO12 = 151,
2191    #[doc = "Servo #13."]
2192    MAV_COMP_ID_SERVO13 = 152,
2193    #[doc = "Servo #14."]
2194    MAV_COMP_ID_SERVO14 = 153,
2195    #[doc = "Gimbal #1."]
2196    MAV_COMP_ID_GIMBAL = 154,
2197    #[doc = "Logging component."]
2198    MAV_COMP_ID_LOG = 155,
2199    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2200    MAV_COMP_ID_ADSB = 156,
2201    #[doc = "On Screen Display (OSD) devices for video links."]
2202    MAV_COMP_ID_OSD = 157,
2203    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2204    MAV_COMP_ID_PERIPHERAL = 158,
2205    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2206    #[doc = "Gimbal ID for QX1."]
2207    MAV_COMP_ID_QX1_GIMBAL = 159,
2208    #[doc = "FLARM collision alert component."]
2209    MAV_COMP_ID_FLARM = 160,
2210    #[doc = "Parachute component."]
2211    MAV_COMP_ID_PARACHUTE = 161,
2212    #[doc = "Winch component."]
2213    MAV_COMP_ID_WINCH = 169,
2214    #[doc = "Gimbal #2."]
2215    MAV_COMP_ID_GIMBAL2 = 171,
2216    #[doc = "Gimbal #3."]
2217    MAV_COMP_ID_GIMBAL3 = 172,
2218    #[doc = "Gimbal #4"]
2219    MAV_COMP_ID_GIMBAL4 = 173,
2220    #[doc = "Gimbal #5."]
2221    MAV_COMP_ID_GIMBAL5 = 174,
2222    #[doc = "Gimbal #6."]
2223    MAV_COMP_ID_GIMBAL6 = 175,
2224    #[doc = "Battery #1."]
2225    MAV_COMP_ID_BATTERY = 180,
2226    #[doc = "Battery #2."]
2227    MAV_COMP_ID_BATTERY2 = 181,
2228    #[doc = "CAN over MAVLink client."]
2229    MAV_COMP_ID_MAVCAN = 189,
2230    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2231    MAV_COMP_ID_MISSIONPLANNER = 190,
2232    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2233    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2234    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2235    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2236    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2237    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2238    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2239    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2240    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2241    MAV_COMP_ID_PATHPLANNER = 195,
2242    #[doc = "Component that plans a collision free path between two points."]
2243    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2244    #[doc = "Component that provides position estimates using VIO techniques."]
2245    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2246    #[doc = "Component that manages pairing of vehicle and GCS."]
2247    MAV_COMP_ID_PAIRING_MANAGER = 198,
2248    #[doc = "Inertial Measurement Unit (IMU) #1."]
2249    MAV_COMP_ID_IMU = 200,
2250    #[doc = "Inertial Measurement Unit (IMU) #2."]
2251    MAV_COMP_ID_IMU_2 = 201,
2252    #[doc = "Inertial Measurement Unit (IMU) #3."]
2253    MAV_COMP_ID_IMU_3 = 202,
2254    #[doc = "GPS #1."]
2255    MAV_COMP_ID_GPS = 220,
2256    #[doc = "GPS #2."]
2257    MAV_COMP_ID_GPS2 = 221,
2258    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2259    MAV_COMP_ID_ODID_TXRX_1 = 236,
2260    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2261    MAV_COMP_ID_ODID_TXRX_2 = 237,
2262    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2263    MAV_COMP_ID_ODID_TXRX_3 = 238,
2264    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2265    MAV_COMP_ID_UDP_BRIDGE = 240,
2266    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2267    MAV_COMP_ID_UART_BRIDGE = 241,
2268    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2269    MAV_COMP_ID_TUNNEL_NODE = 242,
2270    #[doc = "Illuminator"]
2271    MAV_COMP_ID_ILLUMINATOR = 243,
2272    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2273    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2274    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2275}
2276impl MavComponent {
2277    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2278}
2279impl Default for MavComponent {
2280    fn default() -> Self {
2281        Self::DEFAULT
2282    }
2283}
2284#[cfg_attr(feature = "ts", derive(TS))]
2285#[cfg_attr(feature = "ts", ts(export))]
2286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2288#[cfg_attr(feature = "serde", serde(tag = "type"))]
2289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2290#[repr(u32)]
2291#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2292#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2293pub enum MavDataStream {
2294    #[doc = "Enable all data streams"]
2295    MAV_DATA_STREAM_ALL = 0,
2296    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2297    MAV_DATA_STREAM_RAW_SENSORS = 1,
2298    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2299    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2300    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2301    MAV_DATA_STREAM_RC_CHANNELS = 3,
2302    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2303    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2304    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2305    MAV_DATA_STREAM_POSITION = 6,
2306    #[doc = "Dependent on the autopilot"]
2307    MAV_DATA_STREAM_EXTRA1 = 10,
2308    #[doc = "Dependent on the autopilot"]
2309    MAV_DATA_STREAM_EXTRA2 = 11,
2310    #[doc = "Dependent on the autopilot"]
2311    MAV_DATA_STREAM_EXTRA3 = 12,
2312}
2313impl MavDataStream {
2314    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2315}
2316impl Default for MavDataStream {
2317    fn default() -> Self {
2318        Self::DEFAULT
2319    }
2320}
2321#[cfg_attr(feature = "ts", derive(TS))]
2322#[cfg_attr(feature = "ts", ts(export))]
2323#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2325#[cfg_attr(feature = "serde", serde(tag = "type"))]
2326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2327#[repr(u32)]
2328#[doc = "Enumeration of distance sensor types"]
2329pub enum MavDistanceSensor {
2330    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2331    MAV_DISTANCE_SENSOR_LASER = 0,
2332    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2333    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2334    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2335    MAV_DISTANCE_SENSOR_INFRARED = 2,
2336    #[doc = "Radar type, e.g. uLanding units"]
2337    MAV_DISTANCE_SENSOR_RADAR = 3,
2338    #[doc = "Broken or unknown type, e.g. analog units"]
2339    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2340}
2341impl MavDistanceSensor {
2342    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2343}
2344impl Default for MavDistanceSensor {
2345    fn default() -> Self {
2346        Self::DEFAULT
2347    }
2348}
2349#[cfg_attr(feature = "ts", derive(TS))]
2350#[cfg_attr(feature = "ts", ts(export))]
2351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "serde", serde(tag = "type"))]
2354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2355#[repr(u32)]
2356#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2357pub enum MavDoRepositionFlags {
2358    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2359    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2360}
2361impl MavDoRepositionFlags {
2362    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2363}
2364impl Default for MavDoRepositionFlags {
2365    fn default() -> Self {
2366        Self::DEFAULT
2367    }
2368}
2369#[cfg_attr(feature = "ts", derive(TS))]
2370#[cfg_attr(feature = "ts", ts(export))]
2371#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2373#[cfg_attr(feature = "serde", serde(tag = "type"))]
2374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2375#[repr(u32)]
2376#[doc = "Enumeration of estimator types"]
2377pub enum MavEstimatorType {
2378    #[doc = "Unknown type of the estimator."]
2379    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2380    #[doc = "This is a naive estimator without any real covariance feedback."]
2381    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2382    #[doc = "Computer vision based estimate. Might be up to scale."]
2383    MAV_ESTIMATOR_TYPE_VISION = 2,
2384    #[doc = "Visual-inertial estimate."]
2385    MAV_ESTIMATOR_TYPE_VIO = 3,
2386    #[doc = "Plain GPS estimate."]
2387    MAV_ESTIMATOR_TYPE_GPS = 4,
2388    #[doc = "Estimator integrating GPS and inertial sensing."]
2389    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2390    #[doc = "Estimate from external motion capturing system."]
2391    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2392    #[doc = "Estimator based on lidar sensor input."]
2393    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2394    #[doc = "Estimator on autopilot."]
2395    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2396}
2397impl MavEstimatorType {
2398    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2399}
2400impl Default for MavEstimatorType {
2401    fn default() -> Self {
2402        Self::DEFAULT
2403    }
2404}
2405#[cfg_attr(feature = "ts", derive(TS))]
2406#[cfg_attr(feature = "ts", ts(export))]
2407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2409#[cfg_attr(feature = "serde", serde(tag = "type"))]
2410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2411#[repr(u32)]
2412#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2413pub enum MavEventCurrentSequenceFlags {
2414    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2415    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2416}
2417impl MavEventCurrentSequenceFlags {
2418    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2419}
2420impl Default for MavEventCurrentSequenceFlags {
2421    fn default() -> Self {
2422        Self::DEFAULT
2423    }
2424}
2425#[cfg_attr(feature = "ts", derive(TS))]
2426#[cfg_attr(feature = "ts", ts(export))]
2427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2429#[cfg_attr(feature = "serde", serde(tag = "type"))]
2430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2431#[repr(u32)]
2432#[doc = "Reason for an event error response."]
2433pub enum MavEventErrorReason {
2434    #[doc = "The requested event is not available (anymore)."]
2435    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2436}
2437impl MavEventErrorReason {
2438    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2439}
2440impl Default for MavEventErrorReason {
2441    fn default() -> Self {
2442        Self::DEFAULT
2443    }
2444}
2445#[cfg_attr(feature = "ts", derive(TS))]
2446#[cfg_attr(feature = "ts", ts(export))]
2447#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2449#[cfg_attr(feature = "serde", serde(tag = "type"))]
2450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2451#[repr(u32)]
2452#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2453pub enum MavFrame {
2454    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2455    MAV_FRAME_GLOBAL = 0,
2456    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2457    MAV_FRAME_LOCAL_NED = 1,
2458    #[doc = "NOT a coordinate frame, indicates a mission command."]
2459    MAV_FRAME_MISSION = 2,
2460    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2461    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2462    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2463    MAV_FRAME_LOCAL_ENU = 4,
2464    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2465    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2466    MAV_FRAME_GLOBAL_INT = 5,
2467    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2468    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2469    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2470    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2471    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2472    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2473    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2474    MAV_FRAME_BODY_NED = 8,
2475    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2476    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2477    MAV_FRAME_BODY_OFFSET_NED = 9,
2478    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2479    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2480    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2481    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2482    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2483    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2484    MAV_FRAME_BODY_FRD = 12,
2485    #[deprecated = "  (Deprecated since 2019-04)"]
2486    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2487    MAV_FRAME_RESERVED_13 = 13,
2488    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2489    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2490    MAV_FRAME_RESERVED_14 = 14,
2491    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2492    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2493    MAV_FRAME_RESERVED_15 = 15,
2494    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2495    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2496    MAV_FRAME_RESERVED_16 = 16,
2497    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2498    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2499    MAV_FRAME_RESERVED_17 = 17,
2500    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2501    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2502    MAV_FRAME_RESERVED_18 = 18,
2503    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2504    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2505    MAV_FRAME_RESERVED_19 = 19,
2506    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2507    MAV_FRAME_LOCAL_FRD = 20,
2508    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2509    MAV_FRAME_LOCAL_FLU = 21,
2510}
2511impl MavFrame {
2512    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2513}
2514impl Default for MavFrame {
2515    fn default() -> Self {
2516        Self::DEFAULT
2517    }
2518}
2519#[cfg_attr(feature = "ts", derive(TS))]
2520#[cfg_attr(feature = "ts", ts(export))]
2521#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2523#[cfg_attr(feature = "serde", serde(tag = "type"))]
2524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2525#[repr(u32)]
2526#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2527pub enum MavFtpErr {
2528    #[doc = "None: No error"]
2529    MAV_FTP_ERR_NONE = 0,
2530    #[doc = "Fail: Unknown failure"]
2531    MAV_FTP_ERR_FAIL = 1,
2532    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2533    MAV_FTP_ERR_FAILERRNO = 2,
2534    #[doc = "InvalidDataSize: Payload size is invalid"]
2535    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2536    #[doc = "InvalidSession: Session is not currently open"]
2537    MAV_FTP_ERR_INVALIDSESSION = 4,
2538    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2539    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2540    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2541    MAV_FTP_ERR_EOF = 6,
2542    #[doc = "UnknownCommand: Unknown command / opcode"]
2543    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2544    #[doc = "FileExists: File/directory already exists"]
2545    MAV_FTP_ERR_FILEEXISTS = 8,
2546    #[doc = "FileProtected: File/directory is write protected"]
2547    MAV_FTP_ERR_FILEPROTECTED = 9,
2548    #[doc = "FileNotFound: File/directory not found"]
2549    MAV_FTP_ERR_FILENOTFOUND = 10,
2550}
2551impl MavFtpErr {
2552    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2553}
2554impl Default for MavFtpErr {
2555    fn default() -> Self {
2556        Self::DEFAULT
2557    }
2558}
2559#[cfg_attr(feature = "ts", derive(TS))]
2560#[cfg_attr(feature = "ts", ts(export))]
2561#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2563#[cfg_attr(feature = "serde", serde(tag = "type"))]
2564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2565#[repr(u32)]
2566#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2567pub enum MavFtpOpcode {
2568    #[doc = "None. Ignored, always ACKed"]
2569    MAV_FTP_OPCODE_NONE = 0,
2570    #[doc = "TerminateSession: Terminates open Read session"]
2571    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2572    #[doc = "ResetSessions: Terminates all open read sessions"]
2573    MAV_FTP_OPCODE_RESETSESSION = 2,
2574    #[doc = "ListDirectory. List files and directories in path from offset"]
2575    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2576    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2577    MAV_FTP_OPCODE_OPENFILERO = 4,
2578    #[doc = "ReadFile: Reads size bytes from offset in session"]
2579    MAV_FTP_OPCODE_READFILE = 5,
2580    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2581    MAV_FTP_OPCODE_CREATEFILE = 6,
2582    #[doc = "WriteFile: Writes size bytes to offset in session"]
2583    MAV_FTP_OPCODE_WRITEFILE = 7,
2584    #[doc = "RemoveFile: Remove file at path"]
2585    MAV_FTP_OPCODE_REMOVEFILE = 8,
2586    #[doc = "CreateDirectory: Creates directory at path"]
2587    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2588    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2589    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2590    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2591    MAV_FTP_OPCODE_OPENFILEWO = 11,
2592    #[doc = "TruncateFile: Truncate file at path to offset length"]
2593    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2594    #[doc = "Rename: Rename path1 to path2"]
2595    MAV_FTP_OPCODE_RENAME = 13,
2596    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2597    MAV_FTP_OPCODE_CALCFILECRC = 14,
2598    #[doc = "BurstReadFile: Burst download session file"]
2599    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2600    #[doc = "ACK: ACK response"]
2601    MAV_FTP_OPCODE_ACK = 128,
2602    #[doc = "NAK: NAK response"]
2603    MAV_FTP_OPCODE_NAK = 129,
2604}
2605impl MavFtpOpcode {
2606    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2607}
2608impl Default for MavFtpOpcode {
2609    fn default() -> Self {
2610        Self::DEFAULT
2611    }
2612}
2613#[cfg_attr(feature = "ts", derive(TS))]
2614#[cfg_attr(feature = "ts", ts(export))]
2615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2617#[cfg_attr(feature = "serde", serde(tag = "type"))]
2618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2619#[repr(u32)]
2620#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2621pub enum MavFuelType {
2622    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2623    MAV_FUEL_TYPE_UNKNOWN = 0,
2624    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2625    MAV_FUEL_TYPE_LIQUID = 1,
2626    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2627    MAV_FUEL_TYPE_GAS = 2,
2628}
2629impl MavFuelType {
2630    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2631}
2632impl Default for MavFuelType {
2633    fn default() -> Self {
2634        Self::DEFAULT
2635    }
2636}
2637bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2638impl MavGeneratorStatusFlag {
2639    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2640}
2641impl Default for MavGeneratorStatusFlag {
2642    fn default() -> Self {
2643        Self::DEFAULT
2644    }
2645}
2646#[cfg_attr(feature = "ts", derive(TS))]
2647#[cfg_attr(feature = "ts", ts(export))]
2648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2650#[cfg_attr(feature = "serde", serde(tag = "type"))]
2651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2652#[repr(u32)]
2653#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2654pub enum MavGoto {
2655    #[doc = "Hold at the current position."]
2656    MAV_GOTO_DO_HOLD = 0,
2657    #[doc = "Continue with the next item in mission execution."]
2658    MAV_GOTO_DO_CONTINUE = 1,
2659    #[doc = "Hold at the current position of the system"]
2660    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2661    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2662    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2663}
2664impl MavGoto {
2665    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2666}
2667impl Default for MavGoto {
2668    fn default() -> Self {
2669        Self::DEFAULT
2670    }
2671}
2672#[cfg_attr(feature = "ts", derive(TS))]
2673#[cfg_attr(feature = "ts", ts(export))]
2674#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2676#[cfg_attr(feature = "serde", serde(tag = "type"))]
2677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2678#[repr(u32)]
2679#[doc = "Enumeration of landed detector states"]
2680pub enum MavLandedState {
2681    #[doc = "MAV landed state is unknown"]
2682    MAV_LANDED_STATE_UNDEFINED = 0,
2683    #[doc = "MAV is landed (on ground)"]
2684    MAV_LANDED_STATE_ON_GROUND = 1,
2685    #[doc = "MAV is in air"]
2686    MAV_LANDED_STATE_IN_AIR = 2,
2687    #[doc = "MAV currently taking off"]
2688    MAV_LANDED_STATE_TAKEOFF = 3,
2689    #[doc = "MAV currently landing"]
2690    MAV_LANDED_STATE_LANDING = 4,
2691}
2692impl MavLandedState {
2693    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2694}
2695impl Default for MavLandedState {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700#[cfg_attr(feature = "ts", derive(TS))]
2701#[cfg_attr(feature = "ts", ts(export))]
2702#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2704#[cfg_attr(feature = "serde", serde(tag = "type"))]
2705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2706#[repr(u32)]
2707#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2708pub enum MavMissionResult {
2709    #[doc = "mission accepted OK"]
2710    MAV_MISSION_ACCEPTED = 0,
2711    #[doc = "Generic error / not accepting mission commands at all right now."]
2712    MAV_MISSION_ERROR = 1,
2713    #[doc = "Coordinate frame is not supported."]
2714    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2715    #[doc = "Command is not supported."]
2716    MAV_MISSION_UNSUPPORTED = 3,
2717    #[doc = "Mission items exceed storage space."]
2718    MAV_MISSION_NO_SPACE = 4,
2719    #[doc = "One of the parameters has an invalid value."]
2720    MAV_MISSION_INVALID = 5,
2721    #[doc = "param1 has an invalid value."]
2722    MAV_MISSION_INVALID_PARAM1 = 6,
2723    #[doc = "param2 has an invalid value."]
2724    MAV_MISSION_INVALID_PARAM2 = 7,
2725    #[doc = "param3 has an invalid value."]
2726    MAV_MISSION_INVALID_PARAM3 = 8,
2727    #[doc = "param4 has an invalid value."]
2728    MAV_MISSION_INVALID_PARAM4 = 9,
2729    #[doc = "x / param5 has an invalid value."]
2730    MAV_MISSION_INVALID_PARAM5_X = 10,
2731    #[doc = "y / param6 has an invalid value."]
2732    MAV_MISSION_INVALID_PARAM6_Y = 11,
2733    #[doc = "z / param7 has an invalid value."]
2734    MAV_MISSION_INVALID_PARAM7 = 12,
2735    #[doc = "Mission item received out of sequence"]
2736    MAV_MISSION_INVALID_SEQUENCE = 13,
2737    #[doc = "Not accepting any mission commands from this communication partner."]
2738    MAV_MISSION_DENIED = 14,
2739    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2740    MAV_MISSION_OPERATION_CANCELLED = 15,
2741}
2742impl MavMissionResult {
2743    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2744}
2745impl Default for MavMissionResult {
2746    fn default() -> Self {
2747        Self::DEFAULT
2748    }
2749}
2750#[cfg_attr(feature = "ts", derive(TS))]
2751#[cfg_attr(feature = "ts", ts(export))]
2752#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2754#[cfg_attr(feature = "serde", serde(tag = "type"))]
2755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2756#[repr(u32)]
2757#[doc = "Type of mission items being requested/sent in mission protocol."]
2758pub enum MavMissionType {
2759    #[doc = "Items are mission commands for main mission."]
2760    MAV_MISSION_TYPE_MISSION = 0,
2761    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2762    MAV_MISSION_TYPE_FENCE = 1,
2763    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2764    MAV_MISSION_TYPE_RALLY = 2,
2765    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2766    MAV_MISSION_TYPE_ALL = 255,
2767}
2768impl MavMissionType {
2769    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2770}
2771impl Default for MavMissionType {
2772    fn default() -> Self {
2773        Self::DEFAULT
2774    }
2775}
2776#[cfg_attr(feature = "ts", derive(TS))]
2777#[cfg_attr(feature = "ts", ts(export))]
2778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2780#[cfg_attr(feature = "serde", serde(tag = "type"))]
2781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2782#[repr(u32)]
2783#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2784pub enum MavMode {
2785    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2786    MAV_MODE_PREFLIGHT = 0,
2787    #[doc = "System is allowed to be active, under assisted RC control."]
2788    MAV_MODE_STABILIZE_DISARMED = 80,
2789    #[doc = "System is allowed to be active, under assisted RC control."]
2790    MAV_MODE_STABILIZE_ARMED = 208,
2791    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2792    MAV_MODE_MANUAL_DISARMED = 64,
2793    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2794    MAV_MODE_MANUAL_ARMED = 192,
2795    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2796    MAV_MODE_GUIDED_DISARMED = 88,
2797    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2798    MAV_MODE_GUIDED_ARMED = 216,
2799    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2800    MAV_MODE_AUTO_DISARMED = 92,
2801    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2802    MAV_MODE_AUTO_ARMED = 220,
2803    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2804    MAV_MODE_TEST_DISARMED = 66,
2805    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2806    MAV_MODE_TEST_ARMED = 194,
2807}
2808impl MavMode {
2809    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2810}
2811impl Default for MavMode {
2812    fn default() -> Self {
2813        Self::DEFAULT
2814    }
2815}
2816bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2817impl MavModeFlag {
2818    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2819}
2820impl Default for MavModeFlag {
2821    fn default() -> Self {
2822        Self::DEFAULT
2823    }
2824}
2825#[cfg_attr(feature = "ts", derive(TS))]
2826#[cfg_attr(feature = "ts", ts(export))]
2827#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2829#[cfg_attr(feature = "serde", serde(tag = "type"))]
2830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2831#[repr(u32)]
2832#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2833pub enum MavModeFlagDecodePosition {
2834    #[doc = "First bit:  10000000"]
2835    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2836    #[doc = "Second bit: 01000000"]
2837    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2838    #[doc = "Third bit:  00100000"]
2839    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2840    #[doc = "Fourth bit: 00010000"]
2841    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2842    #[doc = "Fifth bit:  00001000"]
2843    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2844    #[doc = "Sixth bit:   00000100"]
2845    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2846    #[doc = "Seventh bit: 00000010"]
2847    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2848    #[doc = "Eighth bit: 00000001"]
2849    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2850}
2851impl MavModeFlagDecodePosition {
2852    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2853}
2854impl Default for MavModeFlagDecodePosition {
2855    fn default() -> Self {
2856        Self::DEFAULT
2857    }
2858}
2859bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2860impl MavModeProperty {
2861    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2862}
2863impl Default for MavModeProperty {
2864    fn default() -> Self {
2865        Self::DEFAULT
2866    }
2867}
2868#[cfg_attr(feature = "ts", derive(TS))]
2869#[cfg_attr(feature = "ts", ts(export))]
2870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2872#[cfg_attr(feature = "serde", serde(tag = "type"))]
2873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2874#[repr(u32)]
2875#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2876#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2877pub enum MavMountMode {
2878    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2879    MAV_MOUNT_MODE_RETRACT = 0,
2880    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2881    MAV_MOUNT_MODE_NEUTRAL = 1,
2882    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2883    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2884    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2885    MAV_MOUNT_MODE_RC_TARGETING = 3,
2886    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2887    MAV_MOUNT_MODE_GPS_POINT = 4,
2888    #[doc = "Gimbal tracks system with specified system ID"]
2889    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2890    #[doc = "Gimbal tracks home position"]
2891    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2892}
2893impl MavMountMode {
2894    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2895}
2896impl Default for MavMountMode {
2897    fn default() -> Self {
2898        Self::DEFAULT
2899    }
2900}
2901#[cfg_attr(feature = "ts", derive(TS))]
2902#[cfg_attr(feature = "ts", ts(export))]
2903#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2905#[cfg_attr(feature = "serde", serde(tag = "type"))]
2906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2907#[repr(u32)]
2908pub enum MavOdidArmStatus {
2909    #[doc = "Passing arming checks."]
2910    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2911    #[doc = "Generic arming failure, see error string for details."]
2912    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2913}
2914impl MavOdidArmStatus {
2915    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2916}
2917impl Default for MavOdidArmStatus {
2918    fn default() -> Self {
2919        Self::DEFAULT
2920    }
2921}
2922#[cfg_attr(feature = "ts", derive(TS))]
2923#[cfg_attr(feature = "ts", ts(export))]
2924#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2926#[cfg_attr(feature = "serde", serde(tag = "type"))]
2927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2928#[repr(u32)]
2929pub enum MavOdidAuthType {
2930    #[doc = "No authentication type is specified."]
2931    MAV_ODID_AUTH_TYPE_NONE = 0,
2932    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2933    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2934    #[doc = "Signature for the Operator ID."]
2935    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2936    #[doc = "Signature for the entire message set."]
2937    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2938    #[doc = "Authentication is provided by Network Remote ID."]
2939    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2940    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2941    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2942}
2943impl MavOdidAuthType {
2944    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2945}
2946impl Default for MavOdidAuthType {
2947    fn default() -> Self {
2948        Self::DEFAULT
2949    }
2950}
2951#[cfg_attr(feature = "ts", derive(TS))]
2952#[cfg_attr(feature = "ts", ts(export))]
2953#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2955#[cfg_attr(feature = "serde", serde(tag = "type"))]
2956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2957#[repr(u32)]
2958pub enum MavOdidCategoryEu {
2959    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2960    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2961    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2962    MAV_ODID_CATEGORY_EU_OPEN = 1,
2963    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2964    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2965    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2966    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2967}
2968impl MavOdidCategoryEu {
2969    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2970}
2971impl Default for MavOdidCategoryEu {
2972    fn default() -> Self {
2973        Self::DEFAULT
2974    }
2975}
2976#[cfg_attr(feature = "ts", derive(TS))]
2977#[cfg_attr(feature = "ts", ts(export))]
2978#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2980#[cfg_attr(feature = "serde", serde(tag = "type"))]
2981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2982#[repr(u32)]
2983pub enum MavOdidClassEu {
2984    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2985    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2986    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2987    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2988    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2989    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2990    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2991    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2992    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2993    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2994    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2995    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2996    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2997    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2998    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2999    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3000}
3001impl MavOdidClassEu {
3002    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3003}
3004impl Default for MavOdidClassEu {
3005    fn default() -> Self {
3006        Self::DEFAULT
3007    }
3008}
3009#[cfg_attr(feature = "ts", derive(TS))]
3010#[cfg_attr(feature = "ts", ts(export))]
3011#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3013#[cfg_attr(feature = "serde", serde(tag = "type"))]
3014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3015#[repr(u32)]
3016pub enum MavOdidClassificationType {
3017    #[doc = "The classification type for the UA is undeclared."]
3018    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3019    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3020    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3021}
3022impl MavOdidClassificationType {
3023    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3024}
3025impl Default for MavOdidClassificationType {
3026    fn default() -> Self {
3027        Self::DEFAULT
3028    }
3029}
3030#[cfg_attr(feature = "ts", derive(TS))]
3031#[cfg_attr(feature = "ts", ts(export))]
3032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3034#[cfg_attr(feature = "serde", serde(tag = "type"))]
3035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3036#[repr(u32)]
3037pub enum MavOdidDescType {
3038    #[doc = "Optional free-form text description of the purpose of the flight."]
3039    MAV_ODID_DESC_TYPE_TEXT = 0,
3040    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3041    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3042    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3043    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3044}
3045impl MavOdidDescType {
3046    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3047}
3048impl Default for MavOdidDescType {
3049    fn default() -> Self {
3050        Self::DEFAULT
3051    }
3052}
3053#[cfg_attr(feature = "ts", derive(TS))]
3054#[cfg_attr(feature = "ts", ts(export))]
3055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3057#[cfg_attr(feature = "serde", serde(tag = "type"))]
3058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3059#[repr(u32)]
3060pub enum MavOdidHeightRef {
3061    #[doc = "The height field is relative to the take-off location."]
3062    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3063    #[doc = "The height field is relative to ground."]
3064    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3065}
3066impl MavOdidHeightRef {
3067    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3068}
3069impl Default for MavOdidHeightRef {
3070    fn default() -> Self {
3071        Self::DEFAULT
3072    }
3073}
3074#[cfg_attr(feature = "ts", derive(TS))]
3075#[cfg_attr(feature = "ts", ts(export))]
3076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3078#[cfg_attr(feature = "serde", serde(tag = "type"))]
3079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3080#[repr(u32)]
3081pub enum MavOdidHorAcc {
3082    #[doc = "The horizontal accuracy is unknown."]
3083    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3084    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3085    MAV_ODID_HOR_ACC_10NM = 1,
3086    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3087    MAV_ODID_HOR_ACC_4NM = 2,
3088    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3089    MAV_ODID_HOR_ACC_2NM = 3,
3090    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3091    MAV_ODID_HOR_ACC_1NM = 4,
3092    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3093    MAV_ODID_HOR_ACC_0_5NM = 5,
3094    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3095    MAV_ODID_HOR_ACC_0_3NM = 6,
3096    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3097    MAV_ODID_HOR_ACC_0_1NM = 7,
3098    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3099    MAV_ODID_HOR_ACC_0_05NM = 8,
3100    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3101    MAV_ODID_HOR_ACC_30_METER = 9,
3102    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3103    MAV_ODID_HOR_ACC_10_METER = 10,
3104    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3105    MAV_ODID_HOR_ACC_3_METER = 11,
3106    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3107    MAV_ODID_HOR_ACC_1_METER = 12,
3108}
3109impl MavOdidHorAcc {
3110    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3111}
3112impl Default for MavOdidHorAcc {
3113    fn default() -> Self {
3114        Self::DEFAULT
3115    }
3116}
3117#[cfg_attr(feature = "ts", derive(TS))]
3118#[cfg_attr(feature = "ts", ts(export))]
3119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3121#[cfg_attr(feature = "serde", serde(tag = "type"))]
3122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3123#[repr(u32)]
3124pub enum MavOdidIdType {
3125    #[doc = "No type defined."]
3126    MAV_ODID_ID_TYPE_NONE = 0,
3127    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3128    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3129    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3130    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3131    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3132    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3133    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3134    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3135}
3136impl MavOdidIdType {
3137    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3138}
3139impl Default for MavOdidIdType {
3140    fn default() -> Self {
3141        Self::DEFAULT
3142    }
3143}
3144#[cfg_attr(feature = "ts", derive(TS))]
3145#[cfg_attr(feature = "ts", ts(export))]
3146#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3148#[cfg_attr(feature = "serde", serde(tag = "type"))]
3149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3150#[repr(u32)]
3151pub enum MavOdidOperatorIdType {
3152    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3153    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3154}
3155impl MavOdidOperatorIdType {
3156    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3157}
3158impl Default for MavOdidOperatorIdType {
3159    fn default() -> Self {
3160        Self::DEFAULT
3161    }
3162}
3163#[cfg_attr(feature = "ts", derive(TS))]
3164#[cfg_attr(feature = "ts", ts(export))]
3165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3167#[cfg_attr(feature = "serde", serde(tag = "type"))]
3168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3169#[repr(u32)]
3170pub enum MavOdidOperatorLocationType {
3171    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3172    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3173    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3174    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3175    #[doc = "The location/altitude of the operator are fixed values."]
3176    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3177}
3178impl MavOdidOperatorLocationType {
3179    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3180}
3181impl Default for MavOdidOperatorLocationType {
3182    fn default() -> Self {
3183        Self::DEFAULT
3184    }
3185}
3186#[cfg_attr(feature = "ts", derive(TS))]
3187#[cfg_attr(feature = "ts", ts(export))]
3188#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3190#[cfg_attr(feature = "serde", serde(tag = "type"))]
3191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3192#[repr(u32)]
3193pub enum MavOdidSpeedAcc {
3194    #[doc = "The speed accuracy is unknown."]
3195    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3196    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3197    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3198    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3199    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3200    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3201    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3202    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3203    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3204}
3205impl MavOdidSpeedAcc {
3206    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3207}
3208impl Default for MavOdidSpeedAcc {
3209    fn default() -> Self {
3210        Self::DEFAULT
3211    }
3212}
3213#[cfg_attr(feature = "ts", derive(TS))]
3214#[cfg_attr(feature = "ts", ts(export))]
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220pub enum MavOdidStatus {
3221    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3222    MAV_ODID_STATUS_UNDECLARED = 0,
3223    #[doc = "The UA is on the ground."]
3224    MAV_ODID_STATUS_GROUND = 1,
3225    #[doc = "The UA is in the air."]
3226    MAV_ODID_STATUS_AIRBORNE = 2,
3227    #[doc = "The UA is having an emergency."]
3228    MAV_ODID_STATUS_EMERGENCY = 3,
3229    #[doc = "The remote ID system is failing or unreliable in some way."]
3230    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3231}
3232impl MavOdidStatus {
3233    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3234}
3235impl Default for MavOdidStatus {
3236    fn default() -> Self {
3237        Self::DEFAULT
3238    }
3239}
3240#[cfg_attr(feature = "ts", derive(TS))]
3241#[cfg_attr(feature = "ts", ts(export))]
3242#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3244#[cfg_attr(feature = "serde", serde(tag = "type"))]
3245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3246#[repr(u32)]
3247pub enum MavOdidTimeAcc {
3248    #[doc = "The timestamp accuracy is unknown."]
3249    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3250    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3251    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3252    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3253    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3254    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3255    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3256    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3257    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3258    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3259    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3260    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3261    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3262    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3263    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3264    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3265    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3266    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3267    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3268    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3269    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3270    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3271    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3272    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3273    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3274    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3275    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3276    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3277    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3278    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3279    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3280}
3281impl MavOdidTimeAcc {
3282    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3283}
3284impl Default for MavOdidTimeAcc {
3285    fn default() -> Self {
3286        Self::DEFAULT
3287    }
3288}
3289#[cfg_attr(feature = "ts", derive(TS))]
3290#[cfg_attr(feature = "ts", ts(export))]
3291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3293#[cfg_attr(feature = "serde", serde(tag = "type"))]
3294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3295#[repr(u32)]
3296pub enum MavOdidUaType {
3297    #[doc = "No UA (Unmanned Aircraft) type defined."]
3298    MAV_ODID_UA_TYPE_NONE = 0,
3299    #[doc = "Aeroplane/Airplane. Fixed wing."]
3300    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3301    #[doc = "Helicopter or multirotor."]
3302    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3303    #[doc = "Gyroplane."]
3304    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3305    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3306    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3307    #[doc = "Ornithopter."]
3308    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3309    #[doc = "Glider."]
3310    MAV_ODID_UA_TYPE_GLIDER = 6,
3311    #[doc = "Kite."]
3312    MAV_ODID_UA_TYPE_KITE = 7,
3313    #[doc = "Free Balloon."]
3314    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3315    #[doc = "Captive Balloon."]
3316    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3317    #[doc = "Airship. E.g. a blimp."]
3318    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3319    #[doc = "Free Fall/Parachute (unpowered)."]
3320    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3321    #[doc = "Rocket."]
3322    MAV_ODID_UA_TYPE_ROCKET = 12,
3323    #[doc = "Tethered powered aircraft."]
3324    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3325    #[doc = "Ground Obstacle."]
3326    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3327    #[doc = "Other type of aircraft not listed earlier."]
3328    MAV_ODID_UA_TYPE_OTHER = 15,
3329}
3330impl MavOdidUaType {
3331    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3332}
3333impl Default for MavOdidUaType {
3334    fn default() -> Self {
3335        Self::DEFAULT
3336    }
3337}
3338#[cfg_attr(feature = "ts", derive(TS))]
3339#[cfg_attr(feature = "ts", ts(export))]
3340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3342#[cfg_attr(feature = "serde", serde(tag = "type"))]
3343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3344#[repr(u32)]
3345pub enum MavOdidVerAcc {
3346    #[doc = "The vertical accuracy is unknown."]
3347    MAV_ODID_VER_ACC_UNKNOWN = 0,
3348    #[doc = "The vertical accuracy is smaller than 150 meter."]
3349    MAV_ODID_VER_ACC_150_METER = 1,
3350    #[doc = "The vertical accuracy is smaller than 45 meter."]
3351    MAV_ODID_VER_ACC_45_METER = 2,
3352    #[doc = "The vertical accuracy is smaller than 25 meter."]
3353    MAV_ODID_VER_ACC_25_METER = 3,
3354    #[doc = "The vertical accuracy is smaller than 10 meter."]
3355    MAV_ODID_VER_ACC_10_METER = 4,
3356    #[doc = "The vertical accuracy is smaller than 3 meter."]
3357    MAV_ODID_VER_ACC_3_METER = 5,
3358    #[doc = "The vertical accuracy is smaller than 1 meter."]
3359    MAV_ODID_VER_ACC_1_METER = 6,
3360}
3361impl MavOdidVerAcc {
3362    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3363}
3364impl Default for MavOdidVerAcc {
3365    fn default() -> Self {
3366        Self::DEFAULT
3367    }
3368}
3369#[cfg_attr(feature = "ts", derive(TS))]
3370#[cfg_attr(feature = "ts", ts(export))]
3371#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3373#[cfg_attr(feature = "serde", serde(tag = "type"))]
3374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3375#[repr(u32)]
3376#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3377pub enum MavParamExtType {
3378    #[doc = "8-bit unsigned integer"]
3379    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3380    #[doc = "8-bit signed integer"]
3381    MAV_PARAM_EXT_TYPE_INT8 = 2,
3382    #[doc = "16-bit unsigned integer"]
3383    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3384    #[doc = "16-bit signed integer"]
3385    MAV_PARAM_EXT_TYPE_INT16 = 4,
3386    #[doc = "32-bit unsigned integer"]
3387    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3388    #[doc = "32-bit signed integer"]
3389    MAV_PARAM_EXT_TYPE_INT32 = 6,
3390    #[doc = "64-bit unsigned integer"]
3391    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3392    #[doc = "64-bit signed integer"]
3393    MAV_PARAM_EXT_TYPE_INT64 = 8,
3394    #[doc = "32-bit floating-point"]
3395    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3396    #[doc = "64-bit floating-point"]
3397    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3398    #[doc = "Custom Type"]
3399    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3400}
3401impl MavParamExtType {
3402    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3403}
3404impl Default for MavParamExtType {
3405    fn default() -> Self {
3406        Self::DEFAULT
3407    }
3408}
3409#[cfg_attr(feature = "ts", derive(TS))]
3410#[cfg_attr(feature = "ts", ts(export))]
3411#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3413#[cfg_attr(feature = "serde", serde(tag = "type"))]
3414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3415#[repr(u32)]
3416#[doc = "Specifies the datatype of a MAVLink parameter."]
3417pub enum MavParamType {
3418    #[doc = "8-bit unsigned integer"]
3419    MAV_PARAM_TYPE_UINT8 = 1,
3420    #[doc = "8-bit signed integer"]
3421    MAV_PARAM_TYPE_INT8 = 2,
3422    #[doc = "16-bit unsigned integer"]
3423    MAV_PARAM_TYPE_UINT16 = 3,
3424    #[doc = "16-bit signed integer"]
3425    MAV_PARAM_TYPE_INT16 = 4,
3426    #[doc = "32-bit unsigned integer"]
3427    MAV_PARAM_TYPE_UINT32 = 5,
3428    #[doc = "32-bit signed integer"]
3429    MAV_PARAM_TYPE_INT32 = 6,
3430    #[doc = "64-bit unsigned integer"]
3431    MAV_PARAM_TYPE_UINT64 = 7,
3432    #[doc = "64-bit signed integer"]
3433    MAV_PARAM_TYPE_INT64 = 8,
3434    #[doc = "32-bit floating-point"]
3435    MAV_PARAM_TYPE_REAL32 = 9,
3436    #[doc = "64-bit floating-point"]
3437    MAV_PARAM_TYPE_REAL64 = 10,
3438}
3439impl MavParamType {
3440    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3441}
3442impl Default for MavParamType {
3443    fn default() -> Self {
3444        Self::DEFAULT
3445    }
3446}
3447bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3448impl MavPowerStatus {
3449    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3450}
3451impl Default for MavPowerStatus {
3452    fn default() -> Self {
3453        Self::DEFAULT
3454    }
3455}
3456bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3457impl MavProtocolCapability {
3458    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3459}
3460impl Default for MavProtocolCapability {
3461    fn default() -> Self {
3462        Self::DEFAULT
3463    }
3464}
3465#[cfg_attr(feature = "ts", derive(TS))]
3466#[cfg_attr(feature = "ts", ts(export))]
3467#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3469#[cfg_attr(feature = "serde", serde(tag = "type"))]
3470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3471#[repr(u32)]
3472#[doc = "Result from a MAVLink command (MAV_CMD)"]
3473pub enum MavResult {
3474    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3475    MAV_RESULT_ACCEPTED = 0,
3476    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3477    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3478    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3479    MAV_RESULT_DENIED = 2,
3480    #[doc = "Command is not supported (unknown)."]
3481    MAV_RESULT_UNSUPPORTED = 3,
3482    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3483    MAV_RESULT_FAILED = 4,
3484    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3485    MAV_RESULT_IN_PROGRESS = 5,
3486    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3487    MAV_RESULT_CANCELLED = 6,
3488    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3489    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3490    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3491    MAV_RESULT_COMMAND_INT_ONLY = 8,
3492    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3493    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3494}
3495impl MavResult {
3496    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3497}
3498impl Default for MavResult {
3499    fn default() -> Self {
3500        Self::DEFAULT
3501    }
3502}
3503#[cfg_attr(feature = "ts", derive(TS))]
3504#[cfg_attr(feature = "ts", ts(export))]
3505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3507#[cfg_attr(feature = "serde", serde(tag = "type"))]
3508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3509#[repr(u32)]
3510#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3511#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3512pub enum MavRoi {
3513    #[doc = "No region of interest."]
3514    MAV_ROI_NONE = 0,
3515    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3516    MAV_ROI_WPNEXT = 1,
3517    #[doc = "Point toward given waypoint."]
3518    MAV_ROI_WPINDEX = 2,
3519    #[doc = "Point toward fixed location."]
3520    MAV_ROI_LOCATION = 3,
3521    #[doc = "Point toward of given id."]
3522    MAV_ROI_TARGET = 4,
3523}
3524impl MavRoi {
3525    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3526}
3527impl Default for MavRoi {
3528    fn default() -> Self {
3529        Self::DEFAULT
3530    }
3531}
3532#[cfg_attr(feature = "ts", derive(TS))]
3533#[cfg_attr(feature = "ts", ts(export))]
3534#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3536#[cfg_attr(feature = "serde", serde(tag = "type"))]
3537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3538#[repr(u32)]
3539#[doc = "Enumeration of sensor orientation, according to its rotations"]
3540pub enum MavSensorOrientation {
3541    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3542    MAV_SENSOR_ROTATION_NONE = 0,
3543    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3544    MAV_SENSOR_ROTATION_YAW_45 = 1,
3545    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3546    MAV_SENSOR_ROTATION_YAW_90 = 2,
3547    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3548    MAV_SENSOR_ROTATION_YAW_135 = 3,
3549    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3550    MAV_SENSOR_ROTATION_YAW_180 = 4,
3551    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3552    MAV_SENSOR_ROTATION_YAW_225 = 5,
3553    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3554    MAV_SENSOR_ROTATION_YAW_270 = 6,
3555    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3556    MAV_SENSOR_ROTATION_YAW_315 = 7,
3557    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3558    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3559    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3560    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3561    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3562    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3563    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3564    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3565    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3566    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3567    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3568    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3569    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3570    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3571    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3572    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3573    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3574    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3575    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3576    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3577    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3578    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3579    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3580    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3581    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3582    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3583    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3584    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3585    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3586    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3587    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3588    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3589    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3590    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3591    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3592    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3593    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3594    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3595    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3596    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3597    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3598    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3599    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3600    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3601    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3602    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3603    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3604    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3605    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3606    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3607    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3608    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3609    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3610    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3611    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3612    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3613    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3614    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3615    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3616    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3617    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3618    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3619    #[doc = "Pitch: 315"]
3620    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3621    #[doc = "Roll: 90, Pitch: 315"]
3622    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3623    #[doc = "Custom orientation"]
3624    MAV_SENSOR_ROTATION_CUSTOM = 100,
3625}
3626impl MavSensorOrientation {
3627    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3628}
3629impl Default for MavSensorOrientation {
3630    fn default() -> Self {
3631        Self::DEFAULT
3632    }
3633}
3634#[cfg_attr(feature = "ts", derive(TS))]
3635#[cfg_attr(feature = "ts", ts(export))]
3636#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3638#[cfg_attr(feature = "serde", serde(tag = "type"))]
3639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3640#[repr(u32)]
3641#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3642pub enum MavSeverity {
3643    #[doc = "System is unusable. This is a \"panic\" condition."]
3644    MAV_SEVERITY_EMERGENCY = 0,
3645    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3646    MAV_SEVERITY_ALERT = 1,
3647    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3648    MAV_SEVERITY_CRITICAL = 2,
3649    #[doc = "Indicates an error in secondary/redundant systems."]
3650    MAV_SEVERITY_ERROR = 3,
3651    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3652    MAV_SEVERITY_WARNING = 4,
3653    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3654    MAV_SEVERITY_NOTICE = 5,
3655    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3656    MAV_SEVERITY_INFO = 6,
3657    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3658    MAV_SEVERITY_DEBUG = 7,
3659}
3660impl MavSeverity {
3661    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3662}
3663impl Default for MavSeverity {
3664    fn default() -> Self {
3665        Self::DEFAULT
3666    }
3667}
3668#[cfg_attr(feature = "ts", derive(TS))]
3669#[cfg_attr(feature = "ts", ts(export))]
3670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3672#[cfg_attr(feature = "serde", serde(tag = "type"))]
3673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3674#[repr(u32)]
3675#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3676pub enum MavStandardMode {
3677    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3678    MAV_STANDARD_MODE_NON_STANDARD = 0,
3679    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3680    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3681    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3682    MAV_STANDARD_MODE_ORBIT = 2,
3683    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3684    MAV_STANDARD_MODE_CRUISE = 3,
3685    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3686    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3687    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3688    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3689    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3690    MAV_STANDARD_MODE_MISSION = 6,
3691    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3692    MAV_STANDARD_MODE_LAND = 7,
3693    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3694    MAV_STANDARD_MODE_TAKEOFF = 8,
3695}
3696impl MavStandardMode {
3697    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3698}
3699impl Default for MavStandardMode {
3700    fn default() -> Self {
3701        Self::DEFAULT
3702    }
3703}
3704#[cfg_attr(feature = "ts", derive(TS))]
3705#[cfg_attr(feature = "ts", ts(export))]
3706#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3708#[cfg_attr(feature = "serde", serde(tag = "type"))]
3709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3710#[repr(u32)]
3711pub enum MavState {
3712    #[doc = "Uninitialized system, state is unknown."]
3713    MAV_STATE_UNINIT = 0,
3714    #[doc = "System is booting up."]
3715    MAV_STATE_BOOT = 1,
3716    #[doc = "System is calibrating and not flight-ready."]
3717    MAV_STATE_CALIBRATING = 2,
3718    #[doc = "System is grounded and on standby. It can be launched any time."]
3719    MAV_STATE_STANDBY = 3,
3720    #[doc = "System is active and might be already airborne. Motors are engaged."]
3721    MAV_STATE_ACTIVE = 4,
3722    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3723    MAV_STATE_CRITICAL = 5,
3724    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3725    MAV_STATE_EMERGENCY = 6,
3726    #[doc = "System just initialized its power-down sequence, will shut down now."]
3727    MAV_STATE_POWEROFF = 7,
3728    #[doc = "System is terminating itself (failsafe or commanded)."]
3729    MAV_STATE_FLIGHT_TERMINATION = 8,
3730}
3731impl MavState {
3732    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3733}
3734impl Default for MavState {
3735    fn default() -> Self {
3736        Self::DEFAULT
3737    }
3738}
3739bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3740impl MavSysStatusSensor {
3741    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3742}
3743impl Default for MavSysStatusSensor {
3744    fn default() -> Self {
3745        Self::DEFAULT
3746    }
3747}
3748bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3749impl MavSysStatusSensorExtended {
3750    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3751}
3752impl Default for MavSysStatusSensorExtended {
3753    fn default() -> Self {
3754        Self::DEFAULT
3755    }
3756}
3757#[cfg_attr(feature = "ts", derive(TS))]
3758#[cfg_attr(feature = "ts", ts(export))]
3759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3761#[cfg_attr(feature = "serde", serde(tag = "type"))]
3762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3763#[repr(u32)]
3764pub enum MavTunnelPayloadType {
3765    #[doc = "Encoding of payload unknown."]
3766    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3767    #[doc = "Registered for STorM32 gimbal controller."]
3768    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3769    #[doc = "Registered for STorM32 gimbal controller."]
3770    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3771    #[doc = "Registered for STorM32 gimbal controller."]
3772    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3773    #[doc = "Registered for STorM32 gimbal controller."]
3774    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3775    #[doc = "Registered for STorM32 gimbal controller."]
3776    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3777    #[doc = "Registered for STorM32 gimbal controller."]
3778    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3779    #[doc = "Registered for STorM32 gimbal controller."]
3780    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3781    #[doc = "Registered for STorM32 gimbal controller."]
3782    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3783    #[doc = "Registered for STorM32 gimbal controller."]
3784    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3785    #[doc = "Registered for STorM32 gimbal controller."]
3786    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3787    #[doc = "Registered for ModalAI remote OSD protocol."]
3788    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3789    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3790    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3791    #[doc = "Registered for ModalAI vendor use."]
3792    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3793}
3794impl MavTunnelPayloadType {
3795    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3796}
3797impl Default for MavTunnelPayloadType {
3798    fn default() -> Self {
3799        Self::DEFAULT
3800    }
3801}
3802#[cfg_attr(feature = "ts", derive(TS))]
3803#[cfg_attr(feature = "ts", ts(export))]
3804#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3806#[cfg_attr(feature = "serde", serde(tag = "type"))]
3807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3808#[repr(u32)]
3809#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3810pub enum MavType {
3811    #[doc = "Generic micro air vehicle"]
3812    MAV_TYPE_GENERIC = 0,
3813    #[doc = "Fixed wing aircraft."]
3814    MAV_TYPE_FIXED_WING = 1,
3815    #[doc = "Quadrotor"]
3816    MAV_TYPE_QUADROTOR = 2,
3817    #[doc = "Coaxial helicopter"]
3818    MAV_TYPE_COAXIAL = 3,
3819    #[doc = "Normal helicopter with tail rotor."]
3820    MAV_TYPE_HELICOPTER = 4,
3821    #[doc = "Ground installation"]
3822    MAV_TYPE_ANTENNA_TRACKER = 5,
3823    #[doc = "Operator control unit / ground control station"]
3824    MAV_TYPE_GCS = 6,
3825    #[doc = "Airship, controlled"]
3826    MAV_TYPE_AIRSHIP = 7,
3827    #[doc = "Free balloon, uncontrolled"]
3828    MAV_TYPE_FREE_BALLOON = 8,
3829    #[doc = "Rocket"]
3830    MAV_TYPE_ROCKET = 9,
3831    #[doc = "Ground rover"]
3832    MAV_TYPE_GROUND_ROVER = 10,
3833    #[doc = "Surface vessel, boat, ship"]
3834    MAV_TYPE_SURFACE_BOAT = 11,
3835    #[doc = "Submarine"]
3836    MAV_TYPE_SUBMARINE = 12,
3837    #[doc = "Hexarotor"]
3838    MAV_TYPE_HEXAROTOR = 13,
3839    #[doc = "Octorotor"]
3840    MAV_TYPE_OCTOROTOR = 14,
3841    #[doc = "Tricopter"]
3842    MAV_TYPE_TRICOPTER = 15,
3843    #[doc = "Flapping wing"]
3844    MAV_TYPE_FLAPPING_WING = 16,
3845    #[doc = "Kite"]
3846    MAV_TYPE_KITE = 17,
3847    #[doc = "Onboard companion controller"]
3848    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3849    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3850    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3851    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3852    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3853    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3854    MAV_TYPE_VTOL_TILTROTOR = 21,
3855    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3856    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3857    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3858    MAV_TYPE_VTOL_TAILSITTER = 23,
3859    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3860    MAV_TYPE_VTOL_TILTWING = 24,
3861    #[doc = "VTOL reserved 5"]
3862    MAV_TYPE_VTOL_RESERVED5 = 25,
3863    #[doc = "Gimbal"]
3864    MAV_TYPE_GIMBAL = 26,
3865    #[doc = "ADSB system"]
3866    MAV_TYPE_ADSB = 27,
3867    #[doc = "Steerable, nonrigid airfoil"]
3868    MAV_TYPE_PARAFOIL = 28,
3869    #[doc = "Dodecarotor"]
3870    MAV_TYPE_DODECAROTOR = 29,
3871    #[doc = "Camera"]
3872    MAV_TYPE_CAMERA = 30,
3873    #[doc = "Charging station"]
3874    MAV_TYPE_CHARGING_STATION = 31,
3875    #[doc = "FLARM collision avoidance system"]
3876    MAV_TYPE_FLARM = 32,
3877    #[doc = "Servo"]
3878    MAV_TYPE_SERVO = 33,
3879    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3880    MAV_TYPE_ODID = 34,
3881    #[doc = "Decarotor"]
3882    MAV_TYPE_DECAROTOR = 35,
3883    #[doc = "Battery"]
3884    MAV_TYPE_BATTERY = 36,
3885    #[doc = "Parachute"]
3886    MAV_TYPE_PARACHUTE = 37,
3887    #[doc = "Log"]
3888    MAV_TYPE_LOG = 38,
3889    #[doc = "OSD"]
3890    MAV_TYPE_OSD = 39,
3891    #[doc = "IMU"]
3892    MAV_TYPE_IMU = 40,
3893    #[doc = "GPS"]
3894    MAV_TYPE_GPS = 41,
3895    #[doc = "Winch"]
3896    MAV_TYPE_WINCH = 42,
3897    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3898    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3899    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3900    MAV_TYPE_ILLUMINATOR = 44,
3901    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3902    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3903}
3904impl MavType {
3905    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3906}
3907impl Default for MavType {
3908    fn default() -> Self {
3909        Self::DEFAULT
3910    }
3911}
3912#[cfg_attr(feature = "ts", derive(TS))]
3913#[cfg_attr(feature = "ts", ts(export))]
3914#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3916#[cfg_attr(feature = "serde", serde(tag = "type"))]
3917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3918#[repr(u32)]
3919#[doc = "Enumeration of VTOL states"]
3920pub enum MavVtolState {
3921    #[doc = "MAV is not configured as VTOL"]
3922    MAV_VTOL_STATE_UNDEFINED = 0,
3923    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3924    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3925    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3926    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3927    #[doc = "VTOL is in multicopter state"]
3928    MAV_VTOL_STATE_MC = 3,
3929    #[doc = "VTOL is in fixed-wing state"]
3930    MAV_VTOL_STATE_FW = 4,
3931}
3932impl MavVtolState {
3933    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3934}
3935impl Default for MavVtolState {
3936    fn default() -> Self {
3937        Self::DEFAULT
3938    }
3939}
3940bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3941impl MavWinchStatusFlag {
3942    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3943}
3944impl Default for MavWinchStatusFlag {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[cfg_attr(feature = "ts", derive(TS))]
3950#[cfg_attr(feature = "ts", ts(export))]
3951#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3953#[cfg_attr(feature = "serde", serde(tag = "type"))]
3954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3955#[repr(u32)]
3956pub enum MavlinkDataStreamType {
3957    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3958    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3959    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3960    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3961    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3962    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3963}
3964impl MavlinkDataStreamType {
3965    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3966}
3967impl Default for MavlinkDataStreamType {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3980pub enum MissionState {
3981    #[doc = "The mission status reporting is not supported."]
3982    MISSION_STATE_UNKNOWN = 0,
3983    #[doc = "No mission on the vehicle."]
3984    MISSION_STATE_NO_MISSION = 1,
3985    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3986    MISSION_STATE_NOT_STARTED = 2,
3987    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3988    MISSION_STATE_ACTIVE = 3,
3989    #[doc = "Mission is paused when in auto mode."]
3990    MISSION_STATE_PAUSED = 4,
3991    #[doc = "Mission has executed all mission items."]
3992    MISSION_STATE_COMPLETE = 5,
3993}
3994impl MissionState {
3995    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3996}
3997impl Default for MissionState {
3998    fn default() -> Self {
3999        Self::DEFAULT
4000    }
4001}
4002#[cfg_attr(feature = "ts", derive(TS))]
4003#[cfg_attr(feature = "ts", ts(export))]
4004#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4006#[cfg_attr(feature = "serde", serde(tag = "type"))]
4007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4008#[repr(u32)]
4009#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4010pub enum MotorTestOrder {
4011    #[doc = "Default autopilot motor test method."]
4012    MOTOR_TEST_ORDER_DEFAULT = 0,
4013    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4014    MOTOR_TEST_ORDER_SEQUENCE = 1,
4015    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4016    MOTOR_TEST_ORDER_BOARD = 2,
4017}
4018impl MotorTestOrder {
4019    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4020}
4021impl Default for MotorTestOrder {
4022    fn default() -> Self {
4023        Self::DEFAULT
4024    }
4025}
4026#[cfg_attr(feature = "ts", derive(TS))]
4027#[cfg_attr(feature = "ts", ts(export))]
4028#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4030#[cfg_attr(feature = "serde", serde(tag = "type"))]
4031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4032#[repr(u32)]
4033#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
4034pub enum MotorTestThrottleType {
4035    #[doc = "Throttle as a percentage (0 ~ 100)"]
4036    MOTOR_TEST_THROTTLE_PERCENT = 0,
4037    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
4038    MOTOR_TEST_THROTTLE_PWM = 1,
4039    #[doc = "Throttle pass-through from pilot's transmitter."]
4040    MOTOR_TEST_THROTTLE_PILOT = 2,
4041    #[doc = "Per-motor compass calibration test."]
4042    MOTOR_TEST_COMPASS_CAL = 3,
4043}
4044impl MotorTestThrottleType {
4045    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
4046}
4047impl Default for MotorTestThrottleType {
4048    fn default() -> Self {
4049        Self::DEFAULT
4050    }
4051}
4052#[cfg_attr(feature = "ts", derive(TS))]
4053#[cfg_attr(feature = "ts", ts(export))]
4054#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4056#[cfg_attr(feature = "serde", serde(tag = "type"))]
4057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4058#[repr(u32)]
4059pub enum NavVtolLandOptions {
4060    #[doc = "Default autopilot landing behaviour."]
4061    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4062    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4063    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4064    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4065    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4066}
4067impl NavVtolLandOptions {
4068    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4069}
4070impl Default for NavVtolLandOptions {
4071    fn default() -> Self {
4072        Self::DEFAULT
4073    }
4074}
4075#[cfg_attr(feature = "ts", derive(TS))]
4076#[cfg_attr(feature = "ts", ts(export))]
4077#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4079#[cfg_attr(feature = "serde", serde(tag = "type"))]
4080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4081#[repr(u32)]
4082#[doc = "Yaw behaviour during orbit flight."]
4083pub enum OrbitYawBehaviour {
4084    #[doc = "Vehicle front points to the center (default)."]
4085    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4086    #[doc = "Vehicle front holds heading when message received."]
4087    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4088    #[doc = "Yaw uncontrolled."]
4089    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4090    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4091    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4092    #[doc = "Yaw controlled by RC input."]
4093    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4094    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4095    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4096}
4097impl OrbitYawBehaviour {
4098    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4099}
4100impl Default for OrbitYawBehaviour {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4113pub enum ParachuteAction {
4114    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4115    PARACHUTE_DISABLE = 0,
4116    #[doc = "Enable auto-release of parachute."]
4117    PARACHUTE_ENABLE = 1,
4118    #[doc = "Release parachute and kill motors."]
4119    PARACHUTE_RELEASE = 2,
4120}
4121impl ParachuteAction {
4122    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4123}
4124impl Default for ParachuteAction {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Result from PARAM_EXT_SET message."]
4137pub enum ParamAck {
4138    #[doc = "Parameter value ACCEPTED and SET"]
4139    PARAM_ACK_ACCEPTED = 0,
4140    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4141    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4142    #[doc = "Parameter failed to set"]
4143    PARAM_ACK_FAILED = 2,
4144    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4145    PARAM_ACK_IN_PROGRESS = 3,
4146}
4147impl ParamAck {
4148    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4149}
4150impl Default for ParamAck {
4151    fn default() -> Self {
4152        Self::DEFAULT
4153    }
4154}
4155bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4156impl PositionTargetTypemask {
4157    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4158}
4159impl Default for PositionTargetTypemask {
4160    fn default() -> Self {
4161        Self::DEFAULT
4162    }
4163}
4164#[cfg_attr(feature = "ts", derive(TS))]
4165#[cfg_attr(feature = "ts", ts(export))]
4166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4168#[cfg_attr(feature = "serde", serde(tag = "type"))]
4169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4170#[repr(u32)]
4171#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4172pub enum PrecisionLandMode {
4173    #[doc = "Normal (non-precision) landing."]
4174    PRECISION_LAND_MODE_DISABLED = 0,
4175    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4176    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4177    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4178    PRECISION_LAND_MODE_REQUIRED = 2,
4179}
4180impl PrecisionLandMode {
4181    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4182}
4183impl Default for PrecisionLandMode {
4184    fn default() -> Self {
4185        Self::DEFAULT
4186    }
4187}
4188#[cfg_attr(feature = "ts", derive(TS))]
4189#[cfg_attr(feature = "ts", ts(export))]
4190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4192#[cfg_attr(feature = "serde", serde(tag = "type"))]
4193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4194#[repr(u32)]
4195#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4196pub enum PreflightStorageMissionAction {
4197    #[doc = "Read current mission data from persistent storage"]
4198    MISSION_READ_PERSISTENT = 0,
4199    #[doc = "Write current mission data to persistent storage"]
4200    MISSION_WRITE_PERSISTENT = 1,
4201    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4202    MISSION_RESET_DEFAULT = 2,
4203}
4204impl PreflightStorageMissionAction {
4205    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4206}
4207impl Default for PreflightStorageMissionAction {
4208    fn default() -> Self {
4209        Self::DEFAULT
4210    }
4211}
4212#[cfg_attr(feature = "ts", derive(TS))]
4213#[cfg_attr(feature = "ts", ts(export))]
4214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4216#[cfg_attr(feature = "serde", serde(tag = "type"))]
4217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4218#[repr(u32)]
4219#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4220pub enum PreflightStorageParameterAction {
4221    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4222    PARAM_READ_PERSISTENT = 0,
4223    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4224    PARAM_WRITE_PERSISTENT = 1,
4225    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4226    PARAM_RESET_CONFIG_DEFAULT = 2,
4227    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4228    PARAM_RESET_SENSOR_DEFAULT = 3,
4229    #[doc = "Reset all parameters, including operation counters, to default values"]
4230    PARAM_RESET_ALL_DEFAULT = 4,
4231}
4232impl PreflightStorageParameterAction {
4233    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4234}
4235impl Default for PreflightStorageParameterAction {
4236    fn default() -> Self {
4237        Self::DEFAULT
4238    }
4239}
4240bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "RADIO_RC_CHANNELS flags (bitmask)."] pub struct RadioRcChannelsFlags : u16 { # [doc = "Failsafe is active. The content of the RC channels data in the RADIO_RC_CHANNELS message is implementation dependent."] const RADIO_RC_CHANNELS_FLAGS_FAILSAFE = 1 ; # [doc = "Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received."] const RADIO_RC_CHANNELS_FLAGS_OUTDATED = 2 ; } }
4241impl RadioRcChannelsFlags {
4242    pub const DEFAULT: Self = Self::RADIO_RC_CHANNELS_FLAGS_FAILSAFE;
4243}
4244impl Default for RadioRcChannelsFlags {
4245    fn default() -> Self {
4246        Self::DEFAULT
4247    }
4248}
4249#[cfg_attr(feature = "ts", derive(TS))]
4250#[cfg_attr(feature = "ts", ts(export))]
4251#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4253#[cfg_attr(feature = "serde", serde(tag = "type"))]
4254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4255#[repr(u32)]
4256#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4257pub enum RcSubType {
4258    #[doc = "Spektrum DSM2"]
4259    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4260    #[doc = "Spektrum DSMX"]
4261    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4262    #[doc = "Spektrum DSMX8"]
4263    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4264}
4265impl RcSubType {
4266    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4267}
4268impl Default for RcSubType {
4269    fn default() -> Self {
4270        Self::DEFAULT
4271    }
4272}
4273#[cfg_attr(feature = "ts", derive(TS))]
4274#[cfg_attr(feature = "ts", ts(export))]
4275#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4277#[cfg_attr(feature = "serde", serde(tag = "type"))]
4278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4279#[repr(u32)]
4280#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4281pub enum RcType {
4282    #[doc = "Spektrum"]
4283    RC_TYPE_SPEKTRUM = 0,
4284    #[doc = "CRSF"]
4285    RC_TYPE_CRSF = 1,
4286}
4287impl RcType {
4288    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4289}
4290impl Default for RcType {
4291    fn default() -> Self {
4292        Self::DEFAULT
4293    }
4294}
4295#[cfg_attr(feature = "ts", derive(TS))]
4296#[cfg_attr(feature = "ts", ts(export))]
4297#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4299#[cfg_attr(feature = "serde", serde(tag = "type"))]
4300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4301#[repr(u32)]
4302#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4303pub enum RebootShutdownConditions {
4304    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4305    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4306    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4307    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4308}
4309impl RebootShutdownConditions {
4310    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4311}
4312impl Default for RebootShutdownConditions {
4313    fn default() -> Self {
4314        Self::DEFAULT
4315    }
4316}
4317#[cfg_attr(feature = "ts", derive(TS))]
4318#[cfg_attr(feature = "ts", ts(export))]
4319#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4321#[cfg_attr(feature = "serde", serde(tag = "type"))]
4322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4323#[repr(u32)]
4324#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4325pub enum RtkBaselineCoordinateSystem {
4326    #[doc = "Earth-centered, Earth-fixed"]
4327    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4328    #[doc = "RTK basestation centered, north, east, down"]
4329    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4330}
4331impl RtkBaselineCoordinateSystem {
4332    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4333}
4334impl Default for RtkBaselineCoordinateSystem {
4335    fn default() -> Self {
4336        Self::DEFAULT
4337    }
4338}
4339#[cfg_attr(feature = "ts", derive(TS))]
4340#[cfg_attr(feature = "ts", ts(export))]
4341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4343#[cfg_attr(feature = "serde", serde(tag = "type"))]
4344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4345#[repr(u32)]
4346#[doc = "Possible safety switch states."]
4347pub enum SafetySwitchState {
4348    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4349    SAFETY_SWITCH_STATE_SAFE = 0,
4350    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4351    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4352}
4353impl SafetySwitchState {
4354    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4355}
4356impl Default for SafetySwitchState {
4357    fn default() -> Self {
4358        Self::DEFAULT
4359    }
4360}
4361#[cfg_attr(feature = "ts", derive(TS))]
4362#[cfg_attr(feature = "ts", ts(export))]
4363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4365#[cfg_attr(feature = "serde", serde(tag = "type"))]
4366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4367#[repr(u32)]
4368#[doc = "SERIAL_CONTROL device types"]
4369pub enum SerialControlDev {
4370    #[doc = "First telemetry port"]
4371    SERIAL_CONTROL_DEV_TELEM1 = 0,
4372    #[doc = "Second telemetry port"]
4373    SERIAL_CONTROL_DEV_TELEM2 = 1,
4374    #[doc = "First GPS port"]
4375    SERIAL_CONTROL_DEV_GPS1 = 2,
4376    #[doc = "Second GPS port"]
4377    SERIAL_CONTROL_DEV_GPS2 = 3,
4378    #[doc = "system shell"]
4379    SERIAL_CONTROL_DEV_SHELL = 10,
4380    #[doc = "SERIAL0"]
4381    SERIAL_CONTROL_SERIAL0 = 100,
4382    #[doc = "SERIAL1"]
4383    SERIAL_CONTROL_SERIAL1 = 101,
4384    #[doc = "SERIAL2"]
4385    SERIAL_CONTROL_SERIAL2 = 102,
4386    #[doc = "SERIAL3"]
4387    SERIAL_CONTROL_SERIAL3 = 103,
4388    #[doc = "SERIAL4"]
4389    SERIAL_CONTROL_SERIAL4 = 104,
4390    #[doc = "SERIAL5"]
4391    SERIAL_CONTROL_SERIAL5 = 105,
4392    #[doc = "SERIAL6"]
4393    SERIAL_CONTROL_SERIAL6 = 106,
4394    #[doc = "SERIAL7"]
4395    SERIAL_CONTROL_SERIAL7 = 107,
4396    #[doc = "SERIAL8"]
4397    SERIAL_CONTROL_SERIAL8 = 108,
4398    #[doc = "SERIAL9"]
4399    SERIAL_CONTROL_SERIAL9 = 109,
4400}
4401impl SerialControlDev {
4402    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4403}
4404impl Default for SerialControlDev {
4405    fn default() -> Self {
4406        Self::DEFAULT
4407    }
4408}
4409bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4410impl SerialControlFlag {
4411    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4412}
4413impl Default for SerialControlFlag {
4414    fn default() -> Self {
4415        Self::DEFAULT
4416    }
4417}
4418#[cfg_attr(feature = "ts", derive(TS))]
4419#[cfg_attr(feature = "ts", ts(export))]
4420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4422#[cfg_attr(feature = "serde", serde(tag = "type"))]
4423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4424#[repr(u32)]
4425#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4426pub enum SetFocusType {
4427    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4428    FOCUS_TYPE_STEP = 0,
4429    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4430    FOCUS_TYPE_CONTINUOUS = 1,
4431    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4432    FOCUS_TYPE_RANGE = 2,
4433    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4434    FOCUS_TYPE_METERS = 3,
4435    #[doc = "Focus automatically."]
4436    FOCUS_TYPE_AUTO = 4,
4437    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4438    FOCUS_TYPE_AUTO_SINGLE = 5,
4439    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4440    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4441}
4442impl SetFocusType {
4443    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4444}
4445impl Default for SetFocusType {
4446    fn default() -> Self {
4447        Self::DEFAULT
4448    }
4449}
4450#[cfg_attr(feature = "ts", derive(TS))]
4451#[cfg_attr(feature = "ts", ts(export))]
4452#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4454#[cfg_attr(feature = "serde", serde(tag = "type"))]
4455#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4456#[repr(u32)]
4457#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4458pub enum SpeedType {
4459    #[doc = "Airspeed"]
4460    SPEED_TYPE_AIRSPEED = 0,
4461    #[doc = "Groundspeed"]
4462    SPEED_TYPE_GROUNDSPEED = 1,
4463    #[doc = "Climb speed"]
4464    SPEED_TYPE_CLIMB_SPEED = 2,
4465    #[doc = "Descent speed"]
4466    SPEED_TYPE_DESCENT_SPEED = 3,
4467}
4468impl SpeedType {
4469    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4470}
4471impl Default for SpeedType {
4472    fn default() -> Self {
4473        Self::DEFAULT
4474    }
4475}
4476#[cfg_attr(feature = "ts", derive(TS))]
4477#[cfg_attr(feature = "ts", ts(export))]
4478#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4480#[cfg_attr(feature = "serde", serde(tag = "type"))]
4481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4482#[repr(u32)]
4483#[doc = "Flags to indicate the status of camera storage."]
4484pub enum StorageStatus {
4485    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4486    STORAGE_STATUS_EMPTY = 0,
4487    #[doc = "Storage present but unformatted."]
4488    STORAGE_STATUS_UNFORMATTED = 1,
4489    #[doc = "Storage present and ready."]
4490    STORAGE_STATUS_READY = 2,
4491    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4492    STORAGE_STATUS_NOT_SUPPORTED = 3,
4493}
4494impl StorageStatus {
4495    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4496}
4497impl Default for StorageStatus {
4498    fn default() -> Self {
4499        Self::DEFAULT
4500    }
4501}
4502#[cfg_attr(feature = "ts", derive(TS))]
4503#[cfg_attr(feature = "ts", ts(export))]
4504#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4506#[cfg_attr(feature = "serde", serde(tag = "type"))]
4507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4508#[repr(u32)]
4509#[doc = "Flags to indicate the type of storage."]
4510pub enum StorageType {
4511    #[doc = "Storage type is not known."]
4512    STORAGE_TYPE_UNKNOWN = 0,
4513    #[doc = "Storage type is USB device."]
4514    STORAGE_TYPE_USB_STICK = 1,
4515    #[doc = "Storage type is SD card."]
4516    STORAGE_TYPE_SD = 2,
4517    #[doc = "Storage type is microSD card."]
4518    STORAGE_TYPE_MICROSD = 3,
4519    #[doc = "Storage type is CFast."]
4520    STORAGE_TYPE_CF = 4,
4521    #[doc = "Storage type is CFexpress."]
4522    STORAGE_TYPE_CFE = 5,
4523    #[doc = "Storage type is XQD."]
4524    STORAGE_TYPE_XQD = 6,
4525    #[doc = "Storage type is HD mass storage type."]
4526    STORAGE_TYPE_HD = 7,
4527    #[doc = "Storage type is other, not listed type."]
4528    STORAGE_TYPE_OTHER = 254,
4529}
4530impl StorageType {
4531    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4532}
4533impl Default for StorageType {
4534    fn default() -> Self {
4535        Self::DEFAULT
4536    }
4537}
4538bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4539impl StorageUsageFlag {
4540    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4541}
4542impl Default for StorageUsageFlag {
4543    fn default() -> Self {
4544        Self::DEFAULT
4545    }
4546}
4547bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE."] pub struct TargetAbsoluteSensorCapabilityFlags : u8 { const TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION = 1 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_VELOCITY = 2 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ACCELERATION = 4 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ATTITUDE = 8 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_RATES = 16 ; } }
4548impl TargetAbsoluteSensorCapabilityFlags {
4549    pub const DEFAULT: Self = Self::TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION;
4550}
4551impl Default for TargetAbsoluteSensorCapabilityFlags {
4552    fn default() -> Self {
4553        Self::DEFAULT
4554    }
4555}
4556#[cfg_attr(feature = "ts", derive(TS))]
4557#[cfg_attr(feature = "ts", ts(export))]
4558#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4560#[cfg_attr(feature = "serde", serde(tag = "type"))]
4561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4562#[repr(u32)]
4563#[doc = "The frame of a target observation from an onboard sensor."]
4564pub enum TargetObsFrame {
4565    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4566    TARGET_OBS_FRAME_LOCAL_NED = 0,
4567    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4568    TARGET_OBS_FRAME_BODY_FRD = 1,
4569    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle."]
4570    TARGET_OBS_FRAME_LOCAL_OFFSET_NED = 2,
4571    #[doc = "Other sensor frame for target observations neither in local NED nor in body FRD."]
4572    TARGET_OBS_FRAME_OTHER = 3,
4573}
4574impl TargetObsFrame {
4575    pub const DEFAULT: Self = Self::TARGET_OBS_FRAME_LOCAL_NED;
4576}
4577impl Default for TargetObsFrame {
4578    fn default() -> Self {
4579        Self::DEFAULT
4580    }
4581}
4582#[cfg_attr(feature = "ts", derive(TS))]
4583#[cfg_attr(feature = "ts", ts(export))]
4584#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4586#[cfg_attr(feature = "serde", serde(tag = "type"))]
4587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4588#[repr(u32)]
4589#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4590pub enum TuneFormat {
4591    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4592    TUNE_FORMAT_QBASIC1_1 = 1,
4593    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4594    TUNE_FORMAT_MML_MODERN = 2,
4595}
4596impl TuneFormat {
4597    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4598}
4599impl Default for TuneFormat {
4600    fn default() -> Self {
4601        Self::DEFAULT
4602    }
4603}
4604#[cfg_attr(feature = "ts", derive(TS))]
4605#[cfg_attr(feature = "ts", ts(export))]
4606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4608#[cfg_attr(feature = "serde", serde(tag = "type"))]
4609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4610#[repr(u32)]
4611#[doc = "Generalized UAVCAN node health"]
4612pub enum UavcanNodeHealth {
4613    #[doc = "The node is functioning properly."]
4614    UAVCAN_NODE_HEALTH_OK = 0,
4615    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4616    UAVCAN_NODE_HEALTH_WARNING = 1,
4617    #[doc = "The node has encountered a major failure."]
4618    UAVCAN_NODE_HEALTH_ERROR = 2,
4619    #[doc = "The node has suffered a fatal malfunction."]
4620    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4621}
4622impl UavcanNodeHealth {
4623    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4624}
4625impl Default for UavcanNodeHealth {
4626    fn default() -> Self {
4627        Self::DEFAULT
4628    }
4629}
4630#[cfg_attr(feature = "ts", derive(TS))]
4631#[cfg_attr(feature = "ts", ts(export))]
4632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4634#[cfg_attr(feature = "serde", serde(tag = "type"))]
4635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4636#[repr(u32)]
4637#[doc = "Generalized UAVCAN node mode"]
4638pub enum UavcanNodeMode {
4639    #[doc = "The node is performing its primary functions."]
4640    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4641    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4642    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4643    #[doc = "The node is under maintenance."]
4644    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4645    #[doc = "The node is in the process of updating its software."]
4646    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4647    #[doc = "The node is no longer available online."]
4648    UAVCAN_NODE_MODE_OFFLINE = 7,
4649}
4650impl UavcanNodeMode {
4651    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4652}
4653impl Default for UavcanNodeMode {
4654    fn default() -> Self {
4655        Self::DEFAULT
4656    }
4657}
4658bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4659impl UtmDataAvailFlags {
4660    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4661}
4662impl Default for UtmDataAvailFlags {
4663    fn default() -> Self {
4664        Self::DEFAULT
4665    }
4666}
4667#[cfg_attr(feature = "ts", derive(TS))]
4668#[cfg_attr(feature = "ts", ts(export))]
4669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4671#[cfg_attr(feature = "serde", serde(tag = "type"))]
4672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4673#[repr(u32)]
4674#[doc = "Airborne status of UAS."]
4675pub enum UtmFlightState {
4676    #[doc = "The flight state can't be determined."]
4677    UTM_FLIGHT_STATE_UNKNOWN = 1,
4678    #[doc = "UAS on ground."]
4679    UTM_FLIGHT_STATE_GROUND = 2,
4680    #[doc = "UAS airborne."]
4681    UTM_FLIGHT_STATE_AIRBORNE = 3,
4682    #[doc = "UAS is in an emergency flight state."]
4683    UTM_FLIGHT_STATE_EMERGENCY = 16,
4684    #[doc = "UAS has no active controls."]
4685    UTM_FLIGHT_STATE_NOCTRL = 32,
4686}
4687impl UtmFlightState {
4688    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4689}
4690impl Default for UtmFlightState {
4691    fn default() -> Self {
4692        Self::DEFAULT
4693    }
4694}
4695#[cfg_attr(feature = "ts", derive(TS))]
4696#[cfg_attr(feature = "ts", ts(export))]
4697#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4699#[cfg_attr(feature = "serde", serde(tag = "type"))]
4700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4701#[repr(u32)]
4702#[doc = "Video stream encodings"]
4703pub enum VideoStreamEncoding {
4704    #[doc = "Stream encoding is unknown"]
4705    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4706    #[doc = "Stream encoding is H.264"]
4707    VIDEO_STREAM_ENCODING_H264 = 1,
4708    #[doc = "Stream encoding is H.265"]
4709    VIDEO_STREAM_ENCODING_H265 = 2,
4710}
4711impl VideoStreamEncoding {
4712    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4713}
4714impl Default for VideoStreamEncoding {
4715    fn default() -> Self {
4716        Self::DEFAULT
4717    }
4718}
4719bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4720impl VideoStreamStatusFlags {
4721    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4722}
4723impl Default for VideoStreamStatusFlags {
4724    fn default() -> Self {
4725        Self::DEFAULT
4726    }
4727}
4728#[cfg_attr(feature = "ts", derive(TS))]
4729#[cfg_attr(feature = "ts", ts(export))]
4730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4732#[cfg_attr(feature = "serde", serde(tag = "type"))]
4733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4734#[repr(u32)]
4735#[doc = "Video stream types"]
4736pub enum VideoStreamType {
4737    #[doc = "Stream is RTSP"]
4738    VIDEO_STREAM_TYPE_RTSP = 0,
4739    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4740    VIDEO_STREAM_TYPE_RTPUDP = 1,
4741    #[doc = "Stream is MPEG on TCP"]
4742    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4743    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4744    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4745}
4746impl VideoStreamType {
4747    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4748}
4749impl Default for VideoStreamType {
4750    fn default() -> Self {
4751        Self::DEFAULT
4752    }
4753}
4754#[cfg_attr(feature = "ts", derive(TS))]
4755#[cfg_attr(feature = "ts", ts(export))]
4756#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4758#[cfg_attr(feature = "serde", serde(tag = "type"))]
4759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4760#[repr(u32)]
4761#[doc = "Direction of VTOL transition"]
4762pub enum VtolTransitionHeading {
4763    #[doc = "Respect the heading configuration of the vehicle."]
4764    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4765    #[doc = "Use the heading pointing towards the next waypoint."]
4766    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4767    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4768    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4769    #[doc = "Use the specified heading in parameter 4."]
4770    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4771    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4772    VTOL_TRANSITION_HEADING_ANY = 4,
4773}
4774impl VtolTransitionHeading {
4775    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4776}
4777impl Default for VtolTransitionHeading {
4778    fn default() -> Self {
4779        Self::DEFAULT
4780    }
4781}
4782#[cfg_attr(feature = "ts", derive(TS))]
4783#[cfg_attr(feature = "ts", ts(export))]
4784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4786#[cfg_attr(feature = "serde", serde(tag = "type"))]
4787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4788#[repr(u32)]
4789#[doc = "WiFi Mode."]
4790pub enum WifiConfigApMode {
4791    #[doc = "WiFi mode is undefined."]
4792    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4793    #[doc = "WiFi configured as an access point."]
4794    WIFI_CONFIG_AP_MODE_AP = 1,
4795    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4796    WIFI_CONFIG_AP_MODE_STATION = 2,
4797    #[doc = "WiFi disabled."]
4798    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4799}
4800impl WifiConfigApMode {
4801    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4802}
4803impl Default for WifiConfigApMode {
4804    fn default() -> Self {
4805        Self::DEFAULT
4806    }
4807}
4808#[cfg_attr(feature = "ts", derive(TS))]
4809#[cfg_attr(feature = "ts", ts(export))]
4810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4812#[cfg_attr(feature = "serde", serde(tag = "type"))]
4813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4814#[repr(u32)]
4815#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4816pub enum WifiConfigApResponse {
4817    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4818    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4819    #[doc = "Changes accepted."]
4820    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4821    #[doc = "Changes rejected."]
4822    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4823    #[doc = "Invalid Mode."]
4824    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4825    #[doc = "Invalid SSID."]
4826    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4827    #[doc = "Invalid Password."]
4828    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4829}
4830impl WifiConfigApResponse {
4831    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4832}
4833impl Default for WifiConfigApResponse {
4834    fn default() -> Self {
4835        Self::DEFAULT
4836    }
4837}
4838#[cfg_attr(feature = "ts", derive(TS))]
4839#[cfg_attr(feature = "ts", ts(export))]
4840#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4842#[cfg_attr(feature = "serde", serde(tag = "type"))]
4843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4844#[repr(u32)]
4845#[doc = "Winch actions."]
4846pub enum WinchActions {
4847    #[doc = "Allow motor to freewheel."]
4848    WINCH_RELAXED = 0,
4849    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4850    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4851    #[doc = "Wind or unwind line at specified rate."]
4852    WINCH_RATE_CONTROL = 2,
4853    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4854    WINCH_LOCK = 3,
4855    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4856    WINCH_DELIVER = 4,
4857    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4858    WINCH_HOLD = 5,
4859    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4860    WINCH_RETRACT = 6,
4861    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4862    WINCH_LOAD_LINE = 7,
4863    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4864    WINCH_ABANDON_LINE = 8,
4865    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4866    WINCH_LOAD_PAYLOAD = 9,
4867}
4868impl WinchActions {
4869    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4870}
4871impl Default for WinchActions {
4872    fn default() -> Self {
4873        Self::DEFAULT
4874    }
4875}
4876#[doc = "Set the vehicle attitude and body angular rates."]
4877#[doc = ""]
4878#[doc = "ID: 140"]
4879#[derive(Debug, Clone, PartialEq)]
4880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4882#[cfg_attr(feature = "ts", derive(TS))]
4883#[cfg_attr(feature = "ts", ts(export))]
4884pub struct ACTUATOR_CONTROL_TARGET_DATA {
4885    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4886    pub time_usec: u64,
4887    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4888    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4889    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4890    pub controls: [f32; 8],
4891    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4892    pub group_mlx: u8,
4893}
4894impl ACTUATOR_CONTROL_TARGET_DATA {
4895    pub const ENCODED_LEN: usize = 41usize;
4896    pub const DEFAULT: Self = Self {
4897        time_usec: 0_u64,
4898        controls: [0.0_f32; 8usize],
4899        group_mlx: 0_u8,
4900    };
4901    #[cfg(feature = "arbitrary")]
4902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4903        use arbitrary::{Arbitrary, Unstructured};
4904        let mut buf = [0u8; 1024];
4905        rng.fill_bytes(&mut buf);
4906        let mut unstructured = Unstructured::new(&buf);
4907        Self::arbitrary(&mut unstructured).unwrap_or_default()
4908    }
4909}
4910impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4911    fn default() -> Self {
4912        Self::DEFAULT.clone()
4913    }
4914}
4915impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4916    type Message = MavMessage;
4917    const ID: u32 = 140u32;
4918    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4919    const EXTRA_CRC: u8 = 181u8;
4920    const ENCODED_LEN: usize = 41usize;
4921    fn deser(
4922        _version: MavlinkVersion,
4923        __input: &[u8],
4924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4925        let avail_len = __input.len();
4926        let mut payload_buf = [0; Self::ENCODED_LEN];
4927        let mut buf = if avail_len < Self::ENCODED_LEN {
4928            payload_buf[0..avail_len].copy_from_slice(__input);
4929            Bytes::new(&payload_buf)
4930        } else {
4931            Bytes::new(__input)
4932        };
4933        let mut __struct = Self::default();
4934        __struct.time_usec = buf.get_u64_le();
4935        for v in &mut __struct.controls {
4936            let val = buf.get_f32_le();
4937            *v = val;
4938        }
4939        __struct.group_mlx = buf.get_u8();
4940        Ok(__struct)
4941    }
4942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4943        let mut __tmp = BytesMut::new(bytes);
4944        #[allow(clippy::absurd_extreme_comparisons)]
4945        #[allow(unused_comparisons)]
4946        if __tmp.remaining() < Self::ENCODED_LEN {
4947            panic!(
4948                "buffer is too small (need {} bytes, but got {})",
4949                Self::ENCODED_LEN,
4950                __tmp.remaining(),
4951            )
4952        }
4953        __tmp.put_u64_le(self.time_usec);
4954        for val in &self.controls {
4955            __tmp.put_f32_le(*val);
4956        }
4957        __tmp.put_u8(self.group_mlx);
4958        if matches!(version, MavlinkVersion::V2) {
4959            let len = __tmp.len();
4960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4961        } else {
4962            __tmp.len()
4963        }
4964    }
4965}
4966#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4967#[doc = ""]
4968#[doc = "ID: 375"]
4969#[derive(Debug, Clone, PartialEq)]
4970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4972#[cfg_attr(feature = "ts", derive(TS))]
4973#[cfg_attr(feature = "ts", ts(export))]
4974pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4975    #[doc = "Timestamp (since system boot)."]
4976    pub time_usec: u64,
4977    #[doc = "Active outputs"]
4978    pub active: u32,
4979    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4981    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4982    pub actuator: [f32; 32],
4983}
4984impl ACTUATOR_OUTPUT_STATUS_DATA {
4985    pub const ENCODED_LEN: usize = 140usize;
4986    pub const DEFAULT: Self = Self {
4987        time_usec: 0_u64,
4988        active: 0_u32,
4989        actuator: [0.0_f32; 32usize],
4990    };
4991    #[cfg(feature = "arbitrary")]
4992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4993        use arbitrary::{Arbitrary, Unstructured};
4994        let mut buf = [0u8; 1024];
4995        rng.fill_bytes(&mut buf);
4996        let mut unstructured = Unstructured::new(&buf);
4997        Self::arbitrary(&mut unstructured).unwrap_or_default()
4998    }
4999}
5000impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5001    fn default() -> Self {
5002        Self::DEFAULT.clone()
5003    }
5004}
5005impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5006    type Message = MavMessage;
5007    const ID: u32 = 375u32;
5008    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5009    const EXTRA_CRC: u8 = 251u8;
5010    const ENCODED_LEN: usize = 140usize;
5011    fn deser(
5012        _version: MavlinkVersion,
5013        __input: &[u8],
5014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5015        let avail_len = __input.len();
5016        let mut payload_buf = [0; Self::ENCODED_LEN];
5017        let mut buf = if avail_len < Self::ENCODED_LEN {
5018            payload_buf[0..avail_len].copy_from_slice(__input);
5019            Bytes::new(&payload_buf)
5020        } else {
5021            Bytes::new(__input)
5022        };
5023        let mut __struct = Self::default();
5024        __struct.time_usec = buf.get_u64_le();
5025        __struct.active = buf.get_u32_le();
5026        for v in &mut __struct.actuator {
5027            let val = buf.get_f32_le();
5028            *v = val;
5029        }
5030        Ok(__struct)
5031    }
5032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5033        let mut __tmp = BytesMut::new(bytes);
5034        #[allow(clippy::absurd_extreme_comparisons)]
5035        #[allow(unused_comparisons)]
5036        if __tmp.remaining() < Self::ENCODED_LEN {
5037            panic!(
5038                "buffer is too small (need {} bytes, but got {})",
5039                Self::ENCODED_LEN,
5040                __tmp.remaining(),
5041            )
5042        }
5043        __tmp.put_u64_le(self.time_usec);
5044        __tmp.put_u32_le(self.active);
5045        for val in &self.actuator {
5046            __tmp.put_f32_le(*val);
5047        }
5048        if matches!(version, MavlinkVersion::V2) {
5049            let len = __tmp.len();
5050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5051        } else {
5052            __tmp.len()
5053        }
5054    }
5055}
5056#[doc = "The location and information of an ADSB vehicle."]
5057#[doc = ""]
5058#[doc = "ID: 246"]
5059#[derive(Debug, Clone, PartialEq)]
5060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5062#[cfg_attr(feature = "ts", derive(TS))]
5063#[cfg_attr(feature = "ts", ts(export))]
5064pub struct ADSB_VEHICLE_DATA {
5065    #[doc = "ICAO address"]
5066    pub ICAO_address: u32,
5067    #[doc = "Latitude"]
5068    pub lat: i32,
5069    #[doc = "Longitude"]
5070    pub lon: i32,
5071    #[doc = "Altitude(ASL)"]
5072    pub altitude: i32,
5073    #[doc = "Course over ground"]
5074    pub heading: u16,
5075    #[doc = "The horizontal velocity"]
5076    pub hor_velocity: u16,
5077    #[doc = "The vertical velocity. Positive is up"]
5078    pub ver_velocity: i16,
5079    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5080    pub flags: AdsbFlags,
5081    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5082    pub squawk: u16,
5083    #[doc = "ADSB altitude type."]
5084    pub altitude_type: AdsbAltitudeType,
5085    #[doc = "The callsign, 8+null"]
5086    #[cfg_attr(
5087        feature = "serde",
5088        serde(
5089            serialize_with = "crate::nulstr::serialize::<_, 9>",
5090            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
5091        )
5092    )]
5093    #[cfg_attr(feature = "ts", ts(type = "string"))]
5094    pub callsign: [u8; 9],
5095    #[doc = "ADSB emitter type."]
5096    pub emitter_type: AdsbEmitterType,
5097    #[doc = "Time since last communication in seconds"]
5098    pub tslc: u8,
5099}
5100impl ADSB_VEHICLE_DATA {
5101    pub const ENCODED_LEN: usize = 38usize;
5102    pub const DEFAULT: Self = Self {
5103        ICAO_address: 0_u32,
5104        lat: 0_i32,
5105        lon: 0_i32,
5106        altitude: 0_i32,
5107        heading: 0_u16,
5108        hor_velocity: 0_u16,
5109        ver_velocity: 0_i16,
5110        flags: AdsbFlags::DEFAULT,
5111        squawk: 0_u16,
5112        altitude_type: AdsbAltitudeType::DEFAULT,
5113        callsign: [0_u8; 9usize],
5114        emitter_type: AdsbEmitterType::DEFAULT,
5115        tslc: 0_u8,
5116    };
5117    #[cfg(feature = "arbitrary")]
5118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5119        use arbitrary::{Arbitrary, Unstructured};
5120        let mut buf = [0u8; 1024];
5121        rng.fill_bytes(&mut buf);
5122        let mut unstructured = Unstructured::new(&buf);
5123        Self::arbitrary(&mut unstructured).unwrap_or_default()
5124    }
5125}
5126impl Default for ADSB_VEHICLE_DATA {
5127    fn default() -> Self {
5128        Self::DEFAULT.clone()
5129    }
5130}
5131impl MessageData for ADSB_VEHICLE_DATA {
5132    type Message = MavMessage;
5133    const ID: u32 = 246u32;
5134    const NAME: &'static str = "ADSB_VEHICLE";
5135    const EXTRA_CRC: u8 = 184u8;
5136    const ENCODED_LEN: usize = 38usize;
5137    fn deser(
5138        _version: MavlinkVersion,
5139        __input: &[u8],
5140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5141        let avail_len = __input.len();
5142        let mut payload_buf = [0; Self::ENCODED_LEN];
5143        let mut buf = if avail_len < Self::ENCODED_LEN {
5144            payload_buf[0..avail_len].copy_from_slice(__input);
5145            Bytes::new(&payload_buf)
5146        } else {
5147            Bytes::new(__input)
5148        };
5149        let mut __struct = Self::default();
5150        __struct.ICAO_address = buf.get_u32_le();
5151        __struct.lat = buf.get_i32_le();
5152        __struct.lon = buf.get_i32_le();
5153        __struct.altitude = buf.get_i32_le();
5154        __struct.heading = buf.get_u16_le();
5155        __struct.hor_velocity = buf.get_u16_le();
5156        __struct.ver_velocity = buf.get_i16_le();
5157        let tmp = buf.get_u16_le();
5158        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5159            ::mavlink_core::error::ParserError::InvalidFlag {
5160                flag_type: "AdsbFlags",
5161                value: tmp as u32,
5162            },
5163        )?;
5164        __struct.squawk = buf.get_u16_le();
5165        let tmp = buf.get_u8();
5166        __struct.altitude_type =
5167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5168                enum_type: "AdsbAltitudeType",
5169                value: tmp as u32,
5170            })?;
5171        for v in &mut __struct.callsign {
5172            let val = buf.get_u8();
5173            *v = val;
5174        }
5175        let tmp = buf.get_u8();
5176        __struct.emitter_type =
5177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5178                enum_type: "AdsbEmitterType",
5179                value: tmp as u32,
5180            })?;
5181        __struct.tslc = buf.get_u8();
5182        Ok(__struct)
5183    }
5184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5185        let mut __tmp = BytesMut::new(bytes);
5186        #[allow(clippy::absurd_extreme_comparisons)]
5187        #[allow(unused_comparisons)]
5188        if __tmp.remaining() < Self::ENCODED_LEN {
5189            panic!(
5190                "buffer is too small (need {} bytes, but got {})",
5191                Self::ENCODED_LEN,
5192                __tmp.remaining(),
5193            )
5194        }
5195        __tmp.put_u32_le(self.ICAO_address);
5196        __tmp.put_i32_le(self.lat);
5197        __tmp.put_i32_le(self.lon);
5198        __tmp.put_i32_le(self.altitude);
5199        __tmp.put_u16_le(self.heading);
5200        __tmp.put_u16_le(self.hor_velocity);
5201        __tmp.put_i16_le(self.ver_velocity);
5202        __tmp.put_u16_le(self.flags.bits());
5203        __tmp.put_u16_le(self.squawk);
5204        __tmp.put_u8(self.altitude_type as u8);
5205        for val in &self.callsign {
5206            __tmp.put_u8(*val);
5207        }
5208        __tmp.put_u8(self.emitter_type as u8);
5209        __tmp.put_u8(self.tslc);
5210        if matches!(version, MavlinkVersion::V2) {
5211            let len = __tmp.len();
5212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5213        } else {
5214            __tmp.len()
5215        }
5216    }
5217}
5218#[doc = "Airspeed information from a sensor."]
5219#[doc = ""]
5220#[doc = "ID: 295"]
5221#[derive(Debug, Clone, PartialEq)]
5222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5224#[cfg_attr(feature = "ts", derive(TS))]
5225#[cfg_attr(feature = "ts", ts(export))]
5226pub struct AIRSPEED_DATA {
5227    #[doc = "Calibrated airspeed (CAS)."]
5228    pub airspeed: f32,
5229    #[doc = "Raw differential pressure. NaN for value unknown/not supplied."]
5230    pub raw_press: f32,
5231    #[doc = "Temperature. INT16_MAX for value unknown/not supplied."]
5232    pub temperature: i16,
5233    #[doc = "Sensor ID."]
5234    pub id: u8,
5235    #[doc = "Airspeed sensor flags."]
5236    pub flags: AirspeedSensorFlags,
5237}
5238impl AIRSPEED_DATA {
5239    pub const ENCODED_LEN: usize = 12usize;
5240    pub const DEFAULT: Self = Self {
5241        airspeed: 0.0_f32,
5242        raw_press: 0.0_f32,
5243        temperature: 0_i16,
5244        id: 0_u8,
5245        flags: AirspeedSensorFlags::DEFAULT,
5246    };
5247    #[cfg(feature = "arbitrary")]
5248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5249        use arbitrary::{Arbitrary, Unstructured};
5250        let mut buf = [0u8; 1024];
5251        rng.fill_bytes(&mut buf);
5252        let mut unstructured = Unstructured::new(&buf);
5253        Self::arbitrary(&mut unstructured).unwrap_or_default()
5254    }
5255}
5256impl Default for AIRSPEED_DATA {
5257    fn default() -> Self {
5258        Self::DEFAULT.clone()
5259    }
5260}
5261impl MessageData for AIRSPEED_DATA {
5262    type Message = MavMessage;
5263    const ID: u32 = 295u32;
5264    const NAME: &'static str = "AIRSPEED";
5265    const EXTRA_CRC: u8 = 234u8;
5266    const ENCODED_LEN: usize = 12usize;
5267    fn deser(
5268        _version: MavlinkVersion,
5269        __input: &[u8],
5270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5271        let avail_len = __input.len();
5272        let mut payload_buf = [0; Self::ENCODED_LEN];
5273        let mut buf = if avail_len < Self::ENCODED_LEN {
5274            payload_buf[0..avail_len].copy_from_slice(__input);
5275            Bytes::new(&payload_buf)
5276        } else {
5277            Bytes::new(__input)
5278        };
5279        let mut __struct = Self::default();
5280        __struct.airspeed = buf.get_f32_le();
5281        __struct.raw_press = buf.get_f32_le();
5282        __struct.temperature = buf.get_i16_le();
5283        __struct.id = buf.get_u8();
5284        let tmp = buf.get_u8();
5285        __struct.flags = AirspeedSensorFlags::from_bits(tmp & AirspeedSensorFlags::all().bits())
5286            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5287                flag_type: "AirspeedSensorFlags",
5288                value: tmp as u32,
5289            })?;
5290        Ok(__struct)
5291    }
5292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5293        let mut __tmp = BytesMut::new(bytes);
5294        #[allow(clippy::absurd_extreme_comparisons)]
5295        #[allow(unused_comparisons)]
5296        if __tmp.remaining() < Self::ENCODED_LEN {
5297            panic!(
5298                "buffer is too small (need {} bytes, but got {})",
5299                Self::ENCODED_LEN,
5300                __tmp.remaining(),
5301            )
5302        }
5303        __tmp.put_f32_le(self.airspeed);
5304        __tmp.put_f32_le(self.raw_press);
5305        __tmp.put_i16_le(self.temperature);
5306        __tmp.put_u8(self.id);
5307        __tmp.put_u8(self.flags.bits());
5308        if matches!(version, MavlinkVersion::V2) {
5309            let len = __tmp.len();
5310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5311        } else {
5312            __tmp.len()
5313        }
5314    }
5315}
5316#[doc = "The location and information of an AIS vessel."]
5317#[doc = ""]
5318#[doc = "ID: 301"]
5319#[derive(Debug, Clone, PartialEq)]
5320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5322#[cfg_attr(feature = "ts", derive(TS))]
5323#[cfg_attr(feature = "ts", ts(export))]
5324pub struct AIS_VESSEL_DATA {
5325    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5326    pub MMSI: u32,
5327    #[doc = "Latitude"]
5328    pub lat: i32,
5329    #[doc = "Longitude"]
5330    pub lon: i32,
5331    #[doc = "Course over ground"]
5332    pub COG: u16,
5333    #[doc = "True heading"]
5334    pub heading: u16,
5335    #[doc = "Speed over ground"]
5336    pub velocity: u16,
5337    #[doc = "Distance from lat/lon location to bow"]
5338    pub dimension_bow: u16,
5339    #[doc = "Distance from lat/lon location to stern"]
5340    pub dimension_stern: u16,
5341    #[doc = "Time since last communication in seconds"]
5342    pub tslc: u16,
5343    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5344    pub flags: AisFlags,
5345    #[doc = "Turn rate"]
5346    pub turn_rate: i8,
5347    #[doc = "Navigational status"]
5348    pub navigational_status: AisNavStatus,
5349    #[doc = "Type of vessels"]
5350    pub mavtype: AisType,
5351    #[doc = "Distance from lat/lon location to port side"]
5352    pub dimension_port: u8,
5353    #[doc = "Distance from lat/lon location to starboard side"]
5354    pub dimension_starboard: u8,
5355    #[doc = "The vessel callsign"]
5356    #[cfg_attr(
5357        feature = "serde",
5358        serde(
5359            serialize_with = "crate::nulstr::serialize::<_, 7>",
5360            deserialize_with = "crate::nulstr::deserialize::<_, 7>"
5361        )
5362    )]
5363    #[cfg_attr(feature = "ts", ts(type = "string"))]
5364    pub callsign: [u8; 7],
5365    #[doc = "The vessel name"]
5366    #[cfg_attr(
5367        feature = "serde",
5368        serde(
5369            serialize_with = "crate::nulstr::serialize::<_, 20>",
5370            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
5371        )
5372    )]
5373    #[cfg_attr(feature = "ts", ts(type = "string"))]
5374    pub name: [u8; 20],
5375}
5376impl AIS_VESSEL_DATA {
5377    pub const ENCODED_LEN: usize = 58usize;
5378    pub const DEFAULT: Self = Self {
5379        MMSI: 0_u32,
5380        lat: 0_i32,
5381        lon: 0_i32,
5382        COG: 0_u16,
5383        heading: 0_u16,
5384        velocity: 0_u16,
5385        dimension_bow: 0_u16,
5386        dimension_stern: 0_u16,
5387        tslc: 0_u16,
5388        flags: AisFlags::DEFAULT,
5389        turn_rate: 0_i8,
5390        navigational_status: AisNavStatus::DEFAULT,
5391        mavtype: AisType::DEFAULT,
5392        dimension_port: 0_u8,
5393        dimension_starboard: 0_u8,
5394        callsign: [0_u8; 7usize],
5395        name: [0_u8; 20usize],
5396    };
5397    #[cfg(feature = "arbitrary")]
5398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5399        use arbitrary::{Arbitrary, Unstructured};
5400        let mut buf = [0u8; 1024];
5401        rng.fill_bytes(&mut buf);
5402        let mut unstructured = Unstructured::new(&buf);
5403        Self::arbitrary(&mut unstructured).unwrap_or_default()
5404    }
5405}
5406impl Default for AIS_VESSEL_DATA {
5407    fn default() -> Self {
5408        Self::DEFAULT.clone()
5409    }
5410}
5411impl MessageData for AIS_VESSEL_DATA {
5412    type Message = MavMessage;
5413    const ID: u32 = 301u32;
5414    const NAME: &'static str = "AIS_VESSEL";
5415    const EXTRA_CRC: u8 = 243u8;
5416    const ENCODED_LEN: usize = 58usize;
5417    fn deser(
5418        _version: MavlinkVersion,
5419        __input: &[u8],
5420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5421        let avail_len = __input.len();
5422        let mut payload_buf = [0; Self::ENCODED_LEN];
5423        let mut buf = if avail_len < Self::ENCODED_LEN {
5424            payload_buf[0..avail_len].copy_from_slice(__input);
5425            Bytes::new(&payload_buf)
5426        } else {
5427            Bytes::new(__input)
5428        };
5429        let mut __struct = Self::default();
5430        __struct.MMSI = buf.get_u32_le();
5431        __struct.lat = buf.get_i32_le();
5432        __struct.lon = buf.get_i32_le();
5433        __struct.COG = buf.get_u16_le();
5434        __struct.heading = buf.get_u16_le();
5435        __struct.velocity = buf.get_u16_le();
5436        __struct.dimension_bow = buf.get_u16_le();
5437        __struct.dimension_stern = buf.get_u16_le();
5438        __struct.tslc = buf.get_u16_le();
5439        let tmp = buf.get_u16_le();
5440        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5441            ::mavlink_core::error::ParserError::InvalidFlag {
5442                flag_type: "AisFlags",
5443                value: tmp as u32,
5444            },
5445        )?;
5446        __struct.turn_rate = buf.get_i8();
5447        let tmp = buf.get_u8();
5448        __struct.navigational_status =
5449            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5450                enum_type: "AisNavStatus",
5451                value: tmp as u32,
5452            })?;
5453        let tmp = buf.get_u8();
5454        __struct.mavtype =
5455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5456                enum_type: "AisType",
5457                value: tmp as u32,
5458            })?;
5459        __struct.dimension_port = buf.get_u8();
5460        __struct.dimension_starboard = buf.get_u8();
5461        for v in &mut __struct.callsign {
5462            let val = buf.get_u8();
5463            *v = val;
5464        }
5465        for v in &mut __struct.name {
5466            let val = buf.get_u8();
5467            *v = val;
5468        }
5469        Ok(__struct)
5470    }
5471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5472        let mut __tmp = BytesMut::new(bytes);
5473        #[allow(clippy::absurd_extreme_comparisons)]
5474        #[allow(unused_comparisons)]
5475        if __tmp.remaining() < Self::ENCODED_LEN {
5476            panic!(
5477                "buffer is too small (need {} bytes, but got {})",
5478                Self::ENCODED_LEN,
5479                __tmp.remaining(),
5480            )
5481        }
5482        __tmp.put_u32_le(self.MMSI);
5483        __tmp.put_i32_le(self.lat);
5484        __tmp.put_i32_le(self.lon);
5485        __tmp.put_u16_le(self.COG);
5486        __tmp.put_u16_le(self.heading);
5487        __tmp.put_u16_le(self.velocity);
5488        __tmp.put_u16_le(self.dimension_bow);
5489        __tmp.put_u16_le(self.dimension_stern);
5490        __tmp.put_u16_le(self.tslc);
5491        __tmp.put_u16_le(self.flags.bits());
5492        __tmp.put_i8(self.turn_rate);
5493        __tmp.put_u8(self.navigational_status as u8);
5494        __tmp.put_u8(self.mavtype as u8);
5495        __tmp.put_u8(self.dimension_port);
5496        __tmp.put_u8(self.dimension_starboard);
5497        for val in &self.callsign {
5498            __tmp.put_u8(*val);
5499        }
5500        for val in &self.name {
5501            __tmp.put_u8(*val);
5502        }
5503        if matches!(version, MavlinkVersion::V2) {
5504            let len = __tmp.len();
5505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5506        } else {
5507            __tmp.len()
5508        }
5509    }
5510}
5511#[doc = "The current system altitude."]
5512#[doc = ""]
5513#[doc = "ID: 141"]
5514#[derive(Debug, Clone, PartialEq)]
5515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5517#[cfg_attr(feature = "ts", derive(TS))]
5518#[cfg_attr(feature = "ts", ts(export))]
5519pub struct ALTITUDE_DATA {
5520    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5521    pub time_usec: u64,
5522    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5523    pub altitude_monotonic: f32,
5524    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5525    pub altitude_amsl: f32,
5526    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5527    pub altitude_local: f32,
5528    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5529    pub altitude_relative: f32,
5530    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5531    pub altitude_terrain: f32,
5532    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5533    pub bottom_clearance: f32,
5534}
5535impl ALTITUDE_DATA {
5536    pub const ENCODED_LEN: usize = 32usize;
5537    pub const DEFAULT: Self = Self {
5538        time_usec: 0_u64,
5539        altitude_monotonic: 0.0_f32,
5540        altitude_amsl: 0.0_f32,
5541        altitude_local: 0.0_f32,
5542        altitude_relative: 0.0_f32,
5543        altitude_terrain: 0.0_f32,
5544        bottom_clearance: 0.0_f32,
5545    };
5546    #[cfg(feature = "arbitrary")]
5547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5548        use arbitrary::{Arbitrary, Unstructured};
5549        let mut buf = [0u8; 1024];
5550        rng.fill_bytes(&mut buf);
5551        let mut unstructured = Unstructured::new(&buf);
5552        Self::arbitrary(&mut unstructured).unwrap_or_default()
5553    }
5554}
5555impl Default for ALTITUDE_DATA {
5556    fn default() -> Self {
5557        Self::DEFAULT.clone()
5558    }
5559}
5560impl MessageData for ALTITUDE_DATA {
5561    type Message = MavMessage;
5562    const ID: u32 = 141u32;
5563    const NAME: &'static str = "ALTITUDE";
5564    const EXTRA_CRC: u8 = 47u8;
5565    const ENCODED_LEN: usize = 32usize;
5566    fn deser(
5567        _version: MavlinkVersion,
5568        __input: &[u8],
5569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5570        let avail_len = __input.len();
5571        let mut payload_buf = [0; Self::ENCODED_LEN];
5572        let mut buf = if avail_len < Self::ENCODED_LEN {
5573            payload_buf[0..avail_len].copy_from_slice(__input);
5574            Bytes::new(&payload_buf)
5575        } else {
5576            Bytes::new(__input)
5577        };
5578        let mut __struct = Self::default();
5579        __struct.time_usec = buf.get_u64_le();
5580        __struct.altitude_monotonic = buf.get_f32_le();
5581        __struct.altitude_amsl = buf.get_f32_le();
5582        __struct.altitude_local = buf.get_f32_le();
5583        __struct.altitude_relative = buf.get_f32_le();
5584        __struct.altitude_terrain = buf.get_f32_le();
5585        __struct.bottom_clearance = buf.get_f32_le();
5586        Ok(__struct)
5587    }
5588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5589        let mut __tmp = BytesMut::new(bytes);
5590        #[allow(clippy::absurd_extreme_comparisons)]
5591        #[allow(unused_comparisons)]
5592        if __tmp.remaining() < Self::ENCODED_LEN {
5593            panic!(
5594                "buffer is too small (need {} bytes, but got {})",
5595                Self::ENCODED_LEN,
5596                __tmp.remaining(),
5597            )
5598        }
5599        __tmp.put_u64_le(self.time_usec);
5600        __tmp.put_f32_le(self.altitude_monotonic);
5601        __tmp.put_f32_le(self.altitude_amsl);
5602        __tmp.put_f32_le(self.altitude_local);
5603        __tmp.put_f32_le(self.altitude_relative);
5604        __tmp.put_f32_le(self.altitude_terrain);
5605        __tmp.put_f32_le(self.bottom_clearance);
5606        if matches!(version, MavlinkVersion::V2) {
5607            let len = __tmp.len();
5608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5609        } else {
5610            __tmp.len()
5611        }
5612    }
5613}
5614#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5615#[doc = ""]
5616#[doc = "ID: 30"]
5617#[derive(Debug, Clone, PartialEq)]
5618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5620#[cfg_attr(feature = "ts", derive(TS))]
5621#[cfg_attr(feature = "ts", ts(export))]
5622pub struct ATTITUDE_DATA {
5623    #[doc = "Timestamp (time since system boot)."]
5624    pub time_boot_ms: u32,
5625    #[doc = "Roll angle (-pi..+pi)"]
5626    pub roll: f32,
5627    #[doc = "Pitch angle (-pi..+pi)"]
5628    pub pitch: f32,
5629    #[doc = "Yaw angle (-pi..+pi)"]
5630    pub yaw: f32,
5631    #[doc = "Roll angular speed"]
5632    pub rollspeed: f32,
5633    #[doc = "Pitch angular speed"]
5634    pub pitchspeed: f32,
5635    #[doc = "Yaw angular speed"]
5636    pub yawspeed: f32,
5637}
5638impl ATTITUDE_DATA {
5639    pub const ENCODED_LEN: usize = 28usize;
5640    pub const DEFAULT: Self = Self {
5641        time_boot_ms: 0_u32,
5642        roll: 0.0_f32,
5643        pitch: 0.0_f32,
5644        yaw: 0.0_f32,
5645        rollspeed: 0.0_f32,
5646        pitchspeed: 0.0_f32,
5647        yawspeed: 0.0_f32,
5648    };
5649    #[cfg(feature = "arbitrary")]
5650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5651        use arbitrary::{Arbitrary, Unstructured};
5652        let mut buf = [0u8; 1024];
5653        rng.fill_bytes(&mut buf);
5654        let mut unstructured = Unstructured::new(&buf);
5655        Self::arbitrary(&mut unstructured).unwrap_or_default()
5656    }
5657}
5658impl Default for ATTITUDE_DATA {
5659    fn default() -> Self {
5660        Self::DEFAULT.clone()
5661    }
5662}
5663impl MessageData for ATTITUDE_DATA {
5664    type Message = MavMessage;
5665    const ID: u32 = 30u32;
5666    const NAME: &'static str = "ATTITUDE";
5667    const EXTRA_CRC: u8 = 39u8;
5668    const ENCODED_LEN: usize = 28usize;
5669    fn deser(
5670        _version: MavlinkVersion,
5671        __input: &[u8],
5672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5673        let avail_len = __input.len();
5674        let mut payload_buf = [0; Self::ENCODED_LEN];
5675        let mut buf = if avail_len < Self::ENCODED_LEN {
5676            payload_buf[0..avail_len].copy_from_slice(__input);
5677            Bytes::new(&payload_buf)
5678        } else {
5679            Bytes::new(__input)
5680        };
5681        let mut __struct = Self::default();
5682        __struct.time_boot_ms = buf.get_u32_le();
5683        __struct.roll = buf.get_f32_le();
5684        __struct.pitch = buf.get_f32_le();
5685        __struct.yaw = buf.get_f32_le();
5686        __struct.rollspeed = buf.get_f32_le();
5687        __struct.pitchspeed = buf.get_f32_le();
5688        __struct.yawspeed = buf.get_f32_le();
5689        Ok(__struct)
5690    }
5691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5692        let mut __tmp = BytesMut::new(bytes);
5693        #[allow(clippy::absurd_extreme_comparisons)]
5694        #[allow(unused_comparisons)]
5695        if __tmp.remaining() < Self::ENCODED_LEN {
5696            panic!(
5697                "buffer is too small (need {} bytes, but got {})",
5698                Self::ENCODED_LEN,
5699                __tmp.remaining(),
5700            )
5701        }
5702        __tmp.put_u32_le(self.time_boot_ms);
5703        __tmp.put_f32_le(self.roll);
5704        __tmp.put_f32_le(self.pitch);
5705        __tmp.put_f32_le(self.yaw);
5706        __tmp.put_f32_le(self.rollspeed);
5707        __tmp.put_f32_le(self.pitchspeed);
5708        __tmp.put_f32_le(self.yawspeed);
5709        if matches!(version, MavlinkVersion::V2) {
5710            let len = __tmp.len();
5711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5712        } else {
5713            __tmp.len()
5714        }
5715    }
5716}
5717#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5718#[doc = ""]
5719#[doc = "ID: 31"]
5720#[derive(Debug, Clone, PartialEq)]
5721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5723#[cfg_attr(feature = "ts", derive(TS))]
5724#[cfg_attr(feature = "ts", ts(export))]
5725pub struct ATTITUDE_QUATERNION_DATA {
5726    #[doc = "Timestamp (time since system boot)."]
5727    pub time_boot_ms: u32,
5728    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5729    pub q1: f32,
5730    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5731    pub q2: f32,
5732    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5733    pub q3: f32,
5734    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5735    pub q4: f32,
5736    #[doc = "Roll angular speed"]
5737    pub rollspeed: f32,
5738    #[doc = "Pitch angular speed"]
5739    pub pitchspeed: f32,
5740    #[doc = "Yaw angular speed"]
5741    pub yawspeed: f32,
5742    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5743    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5746    pub repr_offset_q: [f32; 4],
5747}
5748impl ATTITUDE_QUATERNION_DATA {
5749    pub const ENCODED_LEN: usize = 48usize;
5750    pub const DEFAULT: Self = Self {
5751        time_boot_ms: 0_u32,
5752        q1: 0.0_f32,
5753        q2: 0.0_f32,
5754        q3: 0.0_f32,
5755        q4: 0.0_f32,
5756        rollspeed: 0.0_f32,
5757        pitchspeed: 0.0_f32,
5758        yawspeed: 0.0_f32,
5759        repr_offset_q: [0.0_f32; 4usize],
5760    };
5761    #[cfg(feature = "arbitrary")]
5762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5763        use arbitrary::{Arbitrary, Unstructured};
5764        let mut buf = [0u8; 1024];
5765        rng.fill_bytes(&mut buf);
5766        let mut unstructured = Unstructured::new(&buf);
5767        Self::arbitrary(&mut unstructured).unwrap_or_default()
5768    }
5769}
5770impl Default for ATTITUDE_QUATERNION_DATA {
5771    fn default() -> Self {
5772        Self::DEFAULT.clone()
5773    }
5774}
5775impl MessageData for ATTITUDE_QUATERNION_DATA {
5776    type Message = MavMessage;
5777    const ID: u32 = 31u32;
5778    const NAME: &'static str = "ATTITUDE_QUATERNION";
5779    const EXTRA_CRC: u8 = 246u8;
5780    const ENCODED_LEN: usize = 48usize;
5781    fn deser(
5782        _version: MavlinkVersion,
5783        __input: &[u8],
5784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5785        let avail_len = __input.len();
5786        let mut payload_buf = [0; Self::ENCODED_LEN];
5787        let mut buf = if avail_len < Self::ENCODED_LEN {
5788            payload_buf[0..avail_len].copy_from_slice(__input);
5789            Bytes::new(&payload_buf)
5790        } else {
5791            Bytes::new(__input)
5792        };
5793        let mut __struct = Self::default();
5794        __struct.time_boot_ms = buf.get_u32_le();
5795        __struct.q1 = buf.get_f32_le();
5796        __struct.q2 = buf.get_f32_le();
5797        __struct.q3 = buf.get_f32_le();
5798        __struct.q4 = buf.get_f32_le();
5799        __struct.rollspeed = buf.get_f32_le();
5800        __struct.pitchspeed = buf.get_f32_le();
5801        __struct.yawspeed = buf.get_f32_le();
5802        for v in &mut __struct.repr_offset_q {
5803            let val = buf.get_f32_le();
5804            *v = val;
5805        }
5806        Ok(__struct)
5807    }
5808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5809        let mut __tmp = BytesMut::new(bytes);
5810        #[allow(clippy::absurd_extreme_comparisons)]
5811        #[allow(unused_comparisons)]
5812        if __tmp.remaining() < Self::ENCODED_LEN {
5813            panic!(
5814                "buffer is too small (need {} bytes, but got {})",
5815                Self::ENCODED_LEN,
5816                __tmp.remaining(),
5817            )
5818        }
5819        __tmp.put_u32_le(self.time_boot_ms);
5820        __tmp.put_f32_le(self.q1);
5821        __tmp.put_f32_le(self.q2);
5822        __tmp.put_f32_le(self.q3);
5823        __tmp.put_f32_le(self.q4);
5824        __tmp.put_f32_le(self.rollspeed);
5825        __tmp.put_f32_le(self.pitchspeed);
5826        __tmp.put_f32_le(self.yawspeed);
5827        if matches!(version, MavlinkVersion::V2) {
5828            for val in &self.repr_offset_q {
5829                __tmp.put_f32_le(*val);
5830            }
5831            let len = __tmp.len();
5832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5833        } else {
5834            __tmp.len()
5835        }
5836    }
5837}
5838#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5839#[doc = ""]
5840#[doc = "ID: 61"]
5841#[derive(Debug, Clone, PartialEq)]
5842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5844#[cfg_attr(feature = "ts", derive(TS))]
5845#[cfg_attr(feature = "ts", ts(export))]
5846pub struct ATTITUDE_QUATERNION_COV_DATA {
5847    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5848    pub time_usec: u64,
5849    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5852    pub q: [f32; 4],
5853    #[doc = "Roll angular speed"]
5854    pub rollspeed: f32,
5855    #[doc = "Pitch angular speed"]
5856    pub pitchspeed: f32,
5857    #[doc = "Yaw angular speed"]
5858    pub yawspeed: f32,
5859    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5862    pub covariance: [f32; 9],
5863}
5864impl ATTITUDE_QUATERNION_COV_DATA {
5865    pub const ENCODED_LEN: usize = 72usize;
5866    pub const DEFAULT: Self = Self {
5867        time_usec: 0_u64,
5868        q: [0.0_f32; 4usize],
5869        rollspeed: 0.0_f32,
5870        pitchspeed: 0.0_f32,
5871        yawspeed: 0.0_f32,
5872        covariance: [0.0_f32; 9usize],
5873    };
5874    #[cfg(feature = "arbitrary")]
5875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5876        use arbitrary::{Arbitrary, Unstructured};
5877        let mut buf = [0u8; 1024];
5878        rng.fill_bytes(&mut buf);
5879        let mut unstructured = Unstructured::new(&buf);
5880        Self::arbitrary(&mut unstructured).unwrap_or_default()
5881    }
5882}
5883impl Default for ATTITUDE_QUATERNION_COV_DATA {
5884    fn default() -> Self {
5885        Self::DEFAULT.clone()
5886    }
5887}
5888impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5889    type Message = MavMessage;
5890    const ID: u32 = 61u32;
5891    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5892    const EXTRA_CRC: u8 = 167u8;
5893    const ENCODED_LEN: usize = 72usize;
5894    fn deser(
5895        _version: MavlinkVersion,
5896        __input: &[u8],
5897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5898        let avail_len = __input.len();
5899        let mut payload_buf = [0; Self::ENCODED_LEN];
5900        let mut buf = if avail_len < Self::ENCODED_LEN {
5901            payload_buf[0..avail_len].copy_from_slice(__input);
5902            Bytes::new(&payload_buf)
5903        } else {
5904            Bytes::new(__input)
5905        };
5906        let mut __struct = Self::default();
5907        __struct.time_usec = buf.get_u64_le();
5908        for v in &mut __struct.q {
5909            let val = buf.get_f32_le();
5910            *v = val;
5911        }
5912        __struct.rollspeed = buf.get_f32_le();
5913        __struct.pitchspeed = buf.get_f32_le();
5914        __struct.yawspeed = buf.get_f32_le();
5915        for v in &mut __struct.covariance {
5916            let val = buf.get_f32_le();
5917            *v = val;
5918        }
5919        Ok(__struct)
5920    }
5921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5922        let mut __tmp = BytesMut::new(bytes);
5923        #[allow(clippy::absurd_extreme_comparisons)]
5924        #[allow(unused_comparisons)]
5925        if __tmp.remaining() < Self::ENCODED_LEN {
5926            panic!(
5927                "buffer is too small (need {} bytes, but got {})",
5928                Self::ENCODED_LEN,
5929                __tmp.remaining(),
5930            )
5931        }
5932        __tmp.put_u64_le(self.time_usec);
5933        for val in &self.q {
5934            __tmp.put_f32_le(*val);
5935        }
5936        __tmp.put_f32_le(self.rollspeed);
5937        __tmp.put_f32_le(self.pitchspeed);
5938        __tmp.put_f32_le(self.yawspeed);
5939        for val in &self.covariance {
5940            __tmp.put_f32_le(*val);
5941        }
5942        if matches!(version, MavlinkVersion::V2) {
5943            let len = __tmp.len();
5944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5945        } else {
5946            __tmp.len()
5947        }
5948    }
5949}
5950#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5951#[doc = ""]
5952#[doc = "ID: 83"]
5953#[derive(Debug, Clone, PartialEq)]
5954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5956#[cfg_attr(feature = "ts", derive(TS))]
5957#[cfg_attr(feature = "ts", ts(export))]
5958pub struct ATTITUDE_TARGET_DATA {
5959    #[doc = "Timestamp (time since system boot)."]
5960    pub time_boot_ms: u32,
5961    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5963    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5964    pub q: [f32; 4],
5965    #[doc = "Body roll rate"]
5966    pub body_roll_rate: f32,
5967    #[doc = "Body pitch rate"]
5968    pub body_pitch_rate: f32,
5969    #[doc = "Body yaw rate"]
5970    pub body_yaw_rate: f32,
5971    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5972    pub thrust: f32,
5973    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5974    pub type_mask: AttitudeTargetTypemask,
5975}
5976impl ATTITUDE_TARGET_DATA {
5977    pub const ENCODED_LEN: usize = 37usize;
5978    pub const DEFAULT: Self = Self {
5979        time_boot_ms: 0_u32,
5980        q: [0.0_f32; 4usize],
5981        body_roll_rate: 0.0_f32,
5982        body_pitch_rate: 0.0_f32,
5983        body_yaw_rate: 0.0_f32,
5984        thrust: 0.0_f32,
5985        type_mask: AttitudeTargetTypemask::DEFAULT,
5986    };
5987    #[cfg(feature = "arbitrary")]
5988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5989        use arbitrary::{Arbitrary, Unstructured};
5990        let mut buf = [0u8; 1024];
5991        rng.fill_bytes(&mut buf);
5992        let mut unstructured = Unstructured::new(&buf);
5993        Self::arbitrary(&mut unstructured).unwrap_or_default()
5994    }
5995}
5996impl Default for ATTITUDE_TARGET_DATA {
5997    fn default() -> Self {
5998        Self::DEFAULT.clone()
5999    }
6000}
6001impl MessageData for ATTITUDE_TARGET_DATA {
6002    type Message = MavMessage;
6003    const ID: u32 = 83u32;
6004    const NAME: &'static str = "ATTITUDE_TARGET";
6005    const EXTRA_CRC: u8 = 22u8;
6006    const ENCODED_LEN: usize = 37usize;
6007    fn deser(
6008        _version: MavlinkVersion,
6009        __input: &[u8],
6010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6011        let avail_len = __input.len();
6012        let mut payload_buf = [0; Self::ENCODED_LEN];
6013        let mut buf = if avail_len < Self::ENCODED_LEN {
6014            payload_buf[0..avail_len].copy_from_slice(__input);
6015            Bytes::new(&payload_buf)
6016        } else {
6017            Bytes::new(__input)
6018        };
6019        let mut __struct = Self::default();
6020        __struct.time_boot_ms = buf.get_u32_le();
6021        for v in &mut __struct.q {
6022            let val = buf.get_f32_le();
6023            *v = val;
6024        }
6025        __struct.body_roll_rate = buf.get_f32_le();
6026        __struct.body_pitch_rate = buf.get_f32_le();
6027        __struct.body_yaw_rate = buf.get_f32_le();
6028        __struct.thrust = buf.get_f32_le();
6029        let tmp = buf.get_u8();
6030        __struct.type_mask = AttitudeTargetTypemask::from_bits(
6031            tmp & AttitudeTargetTypemask::all().bits(),
6032        )
6033        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6034            flag_type: "AttitudeTargetTypemask",
6035            value: tmp as u32,
6036        })?;
6037        Ok(__struct)
6038    }
6039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6040        let mut __tmp = BytesMut::new(bytes);
6041        #[allow(clippy::absurd_extreme_comparisons)]
6042        #[allow(unused_comparisons)]
6043        if __tmp.remaining() < Self::ENCODED_LEN {
6044            panic!(
6045                "buffer is too small (need {} bytes, but got {})",
6046                Self::ENCODED_LEN,
6047                __tmp.remaining(),
6048            )
6049        }
6050        __tmp.put_u32_le(self.time_boot_ms);
6051        for val in &self.q {
6052            __tmp.put_f32_le(*val);
6053        }
6054        __tmp.put_f32_le(self.body_roll_rate);
6055        __tmp.put_f32_le(self.body_pitch_rate);
6056        __tmp.put_f32_le(self.body_yaw_rate);
6057        __tmp.put_f32_le(self.thrust);
6058        __tmp.put_u8(self.type_mask.bits());
6059        if matches!(version, MavlinkVersion::V2) {
6060            let len = __tmp.len();
6061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6062        } else {
6063            __tmp.len()
6064        }
6065    }
6066}
6067#[doc = "Motion capture attitude and position."]
6068#[doc = ""]
6069#[doc = "ID: 138"]
6070#[derive(Debug, Clone, PartialEq)]
6071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6073#[cfg_attr(feature = "ts", derive(TS))]
6074#[cfg_attr(feature = "ts", ts(export))]
6075pub struct ATT_POS_MOCAP_DATA {
6076    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6077    pub time_usec: u64,
6078    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6080    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6081    pub q: [f32; 4],
6082    #[doc = "X position (NED)"]
6083    pub x: f32,
6084    #[doc = "Y position (NED)"]
6085    pub y: f32,
6086    #[doc = "Z position (NED)"]
6087    pub z: f32,
6088    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6092    pub covariance: [f32; 21],
6093}
6094impl ATT_POS_MOCAP_DATA {
6095    pub const ENCODED_LEN: usize = 120usize;
6096    pub const DEFAULT: Self = Self {
6097        time_usec: 0_u64,
6098        q: [0.0_f32; 4usize],
6099        x: 0.0_f32,
6100        y: 0.0_f32,
6101        z: 0.0_f32,
6102        covariance: [0.0_f32; 21usize],
6103    };
6104    #[cfg(feature = "arbitrary")]
6105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6106        use arbitrary::{Arbitrary, Unstructured};
6107        let mut buf = [0u8; 1024];
6108        rng.fill_bytes(&mut buf);
6109        let mut unstructured = Unstructured::new(&buf);
6110        Self::arbitrary(&mut unstructured).unwrap_or_default()
6111    }
6112}
6113impl Default for ATT_POS_MOCAP_DATA {
6114    fn default() -> Self {
6115        Self::DEFAULT.clone()
6116    }
6117}
6118impl MessageData for ATT_POS_MOCAP_DATA {
6119    type Message = MavMessage;
6120    const ID: u32 = 138u32;
6121    const NAME: &'static str = "ATT_POS_MOCAP";
6122    const EXTRA_CRC: u8 = 109u8;
6123    const ENCODED_LEN: usize = 120usize;
6124    fn deser(
6125        _version: MavlinkVersion,
6126        __input: &[u8],
6127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6128        let avail_len = __input.len();
6129        let mut payload_buf = [0; Self::ENCODED_LEN];
6130        let mut buf = if avail_len < Self::ENCODED_LEN {
6131            payload_buf[0..avail_len].copy_from_slice(__input);
6132            Bytes::new(&payload_buf)
6133        } else {
6134            Bytes::new(__input)
6135        };
6136        let mut __struct = Self::default();
6137        __struct.time_usec = buf.get_u64_le();
6138        for v in &mut __struct.q {
6139            let val = buf.get_f32_le();
6140            *v = val;
6141        }
6142        __struct.x = buf.get_f32_le();
6143        __struct.y = buf.get_f32_le();
6144        __struct.z = buf.get_f32_le();
6145        for v in &mut __struct.covariance {
6146            let val = buf.get_f32_le();
6147            *v = val;
6148        }
6149        Ok(__struct)
6150    }
6151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6152        let mut __tmp = BytesMut::new(bytes);
6153        #[allow(clippy::absurd_extreme_comparisons)]
6154        #[allow(unused_comparisons)]
6155        if __tmp.remaining() < Self::ENCODED_LEN {
6156            panic!(
6157                "buffer is too small (need {} bytes, but got {})",
6158                Self::ENCODED_LEN,
6159                __tmp.remaining(),
6160            )
6161        }
6162        __tmp.put_u64_le(self.time_usec);
6163        for val in &self.q {
6164            __tmp.put_f32_le(*val);
6165        }
6166        __tmp.put_f32_le(self.x);
6167        __tmp.put_f32_le(self.y);
6168        __tmp.put_f32_le(self.z);
6169        if matches!(version, MavlinkVersion::V2) {
6170            for val in &self.covariance {
6171                __tmp.put_f32_le(*val);
6172            }
6173            let len = __tmp.len();
6174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6175        } else {
6176            __tmp.len()
6177        }
6178    }
6179}
6180#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6181#[doc = ""]
6182#[doc = "ID: 7"]
6183#[derive(Debug, Clone, PartialEq)]
6184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6186#[cfg_attr(feature = "ts", derive(TS))]
6187#[cfg_attr(feature = "ts", ts(export))]
6188pub struct AUTH_KEY_DATA {
6189    #[doc = "key"]
6190    #[cfg_attr(
6191        feature = "serde",
6192        serde(
6193            serialize_with = "crate::nulstr::serialize::<_, 32>",
6194            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
6195        )
6196    )]
6197    #[cfg_attr(feature = "ts", ts(type = "string"))]
6198    pub key: [u8; 32],
6199}
6200impl AUTH_KEY_DATA {
6201    pub const ENCODED_LEN: usize = 32usize;
6202    pub const DEFAULT: Self = Self {
6203        key: [0_u8; 32usize],
6204    };
6205    #[cfg(feature = "arbitrary")]
6206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6207        use arbitrary::{Arbitrary, Unstructured};
6208        let mut buf = [0u8; 1024];
6209        rng.fill_bytes(&mut buf);
6210        let mut unstructured = Unstructured::new(&buf);
6211        Self::arbitrary(&mut unstructured).unwrap_or_default()
6212    }
6213}
6214impl Default for AUTH_KEY_DATA {
6215    fn default() -> Self {
6216        Self::DEFAULT.clone()
6217    }
6218}
6219impl MessageData for AUTH_KEY_DATA {
6220    type Message = MavMessage;
6221    const ID: u32 = 7u32;
6222    const NAME: &'static str = "AUTH_KEY";
6223    const EXTRA_CRC: u8 = 119u8;
6224    const ENCODED_LEN: usize = 32usize;
6225    fn deser(
6226        _version: MavlinkVersion,
6227        __input: &[u8],
6228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6229        let avail_len = __input.len();
6230        let mut payload_buf = [0; Self::ENCODED_LEN];
6231        let mut buf = if avail_len < Self::ENCODED_LEN {
6232            payload_buf[0..avail_len].copy_from_slice(__input);
6233            Bytes::new(&payload_buf)
6234        } else {
6235            Bytes::new(__input)
6236        };
6237        let mut __struct = Self::default();
6238        for v in &mut __struct.key {
6239            let val = buf.get_u8();
6240            *v = val;
6241        }
6242        Ok(__struct)
6243    }
6244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6245        let mut __tmp = BytesMut::new(bytes);
6246        #[allow(clippy::absurd_extreme_comparisons)]
6247        #[allow(unused_comparisons)]
6248        if __tmp.remaining() < Self::ENCODED_LEN {
6249            panic!(
6250                "buffer is too small (need {} bytes, but got {})",
6251                Self::ENCODED_LEN,
6252                __tmp.remaining(),
6253            )
6254        }
6255        for val in &self.key {
6256            __tmp.put_u8(*val);
6257        }
6258        if matches!(version, MavlinkVersion::V2) {
6259            let len = __tmp.len();
6260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6261        } else {
6262            __tmp.len()
6263        }
6264    }
6265}
6266#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6267#[doc = ""]
6268#[doc = "ID: 286"]
6269#[derive(Debug, Clone, PartialEq)]
6270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6272#[cfg_attr(feature = "ts", derive(TS))]
6273#[cfg_attr(feature = "ts", ts(export))]
6274pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6275    #[doc = "Timestamp (time since system boot)."]
6276    pub time_boot_us: u64,
6277    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6280    pub q: [f32; 4],
6281    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6282    pub q_estimated_delay_us: u32,
6283    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6284    pub vx: f32,
6285    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6286    pub vy: f32,
6287    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6288    pub vz: f32,
6289    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6290    pub v_estimated_delay_us: u32,
6291    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6292    pub feed_forward_angular_velocity_z: f32,
6293    #[doc = "Bitmap indicating which estimator outputs are valid."]
6294    pub estimator_status: EstimatorStatusFlags,
6295    #[doc = "System ID"]
6296    pub target_system: u8,
6297    #[doc = "Component ID"]
6298    pub target_component: u8,
6299    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6300    pub landed_state: MavLandedState,
6301    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6303    pub angular_velocity_z: f32,
6304}
6305impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6306    pub const ENCODED_LEN: usize = 57usize;
6307    pub const DEFAULT: Self = Self {
6308        time_boot_us: 0_u64,
6309        q: [0.0_f32; 4usize],
6310        q_estimated_delay_us: 0_u32,
6311        vx: 0.0_f32,
6312        vy: 0.0_f32,
6313        vz: 0.0_f32,
6314        v_estimated_delay_us: 0_u32,
6315        feed_forward_angular_velocity_z: 0.0_f32,
6316        estimator_status: EstimatorStatusFlags::DEFAULT,
6317        target_system: 0_u8,
6318        target_component: 0_u8,
6319        landed_state: MavLandedState::DEFAULT,
6320        angular_velocity_z: 0.0_f32,
6321    };
6322    #[cfg(feature = "arbitrary")]
6323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6324        use arbitrary::{Arbitrary, Unstructured};
6325        let mut buf = [0u8; 1024];
6326        rng.fill_bytes(&mut buf);
6327        let mut unstructured = Unstructured::new(&buf);
6328        Self::arbitrary(&mut unstructured).unwrap_or_default()
6329    }
6330}
6331impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6332    fn default() -> Self {
6333        Self::DEFAULT.clone()
6334    }
6335}
6336impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6337    type Message = MavMessage;
6338    const ID: u32 = 286u32;
6339    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6340    const EXTRA_CRC: u8 = 210u8;
6341    const ENCODED_LEN: usize = 57usize;
6342    fn deser(
6343        _version: MavlinkVersion,
6344        __input: &[u8],
6345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6346        let avail_len = __input.len();
6347        let mut payload_buf = [0; Self::ENCODED_LEN];
6348        let mut buf = if avail_len < Self::ENCODED_LEN {
6349            payload_buf[0..avail_len].copy_from_slice(__input);
6350            Bytes::new(&payload_buf)
6351        } else {
6352            Bytes::new(__input)
6353        };
6354        let mut __struct = Self::default();
6355        __struct.time_boot_us = buf.get_u64_le();
6356        for v in &mut __struct.q {
6357            let val = buf.get_f32_le();
6358            *v = val;
6359        }
6360        __struct.q_estimated_delay_us = buf.get_u32_le();
6361        __struct.vx = buf.get_f32_le();
6362        __struct.vy = buf.get_f32_le();
6363        __struct.vz = buf.get_f32_le();
6364        __struct.v_estimated_delay_us = buf.get_u32_le();
6365        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6366        let tmp = buf.get_u16_le();
6367        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6368            tmp & EstimatorStatusFlags::all().bits(),
6369        )
6370        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6371            flag_type: "EstimatorStatusFlags",
6372            value: tmp as u32,
6373        })?;
6374        __struct.target_system = buf.get_u8();
6375        __struct.target_component = buf.get_u8();
6376        let tmp = buf.get_u8();
6377        __struct.landed_state =
6378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6379                enum_type: "MavLandedState",
6380                value: tmp as u32,
6381            })?;
6382        __struct.angular_velocity_z = buf.get_f32_le();
6383        Ok(__struct)
6384    }
6385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6386        let mut __tmp = BytesMut::new(bytes);
6387        #[allow(clippy::absurd_extreme_comparisons)]
6388        #[allow(unused_comparisons)]
6389        if __tmp.remaining() < Self::ENCODED_LEN {
6390            panic!(
6391                "buffer is too small (need {} bytes, but got {})",
6392                Self::ENCODED_LEN,
6393                __tmp.remaining(),
6394            )
6395        }
6396        __tmp.put_u64_le(self.time_boot_us);
6397        for val in &self.q {
6398            __tmp.put_f32_le(*val);
6399        }
6400        __tmp.put_u32_le(self.q_estimated_delay_us);
6401        __tmp.put_f32_le(self.vx);
6402        __tmp.put_f32_le(self.vy);
6403        __tmp.put_f32_le(self.vz);
6404        __tmp.put_u32_le(self.v_estimated_delay_us);
6405        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6406        __tmp.put_u16_le(self.estimator_status.bits());
6407        __tmp.put_u8(self.target_system);
6408        __tmp.put_u8(self.target_component);
6409        __tmp.put_u8(self.landed_state as u8);
6410        if matches!(version, MavlinkVersion::V2) {
6411            __tmp.put_f32_le(self.angular_velocity_z);
6412            let len = __tmp.len();
6413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6414        } else {
6415            __tmp.len()
6416        }
6417    }
6418}
6419#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6420#[doc = ""]
6421#[doc = "ID: 148"]
6422#[derive(Debug, Clone, PartialEq)]
6423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6425#[cfg_attr(feature = "ts", derive(TS))]
6426#[cfg_attr(feature = "ts", ts(export))]
6427pub struct AUTOPILOT_VERSION_DATA {
6428    #[doc = "Bitmap of capabilities"]
6429    pub capabilities: MavProtocolCapability,
6430    #[doc = "UID if provided by hardware (see uid2)"]
6431    pub uid: u64,
6432    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6433    pub flight_sw_version: u32,
6434    #[doc = "Middleware version number"]
6435    pub middleware_sw_version: u32,
6436    #[doc = "Operating system version number"]
6437    pub os_sw_version: u32,
6438    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6439    pub board_version: u32,
6440    #[doc = "ID of the board vendor"]
6441    pub vendor_id: u16,
6442    #[doc = "ID of the product"]
6443    pub product_id: u16,
6444    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6446    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6447    pub flight_custom_version: [u8; 8],
6448    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6449    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6450    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6451    pub middleware_custom_version: [u8; 8],
6452    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6454    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6455    pub os_custom_version: [u8; 8],
6456    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6459    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6460    pub uid2: [u8; 18],
6461}
6462impl AUTOPILOT_VERSION_DATA {
6463    pub const ENCODED_LEN: usize = 78usize;
6464    pub const DEFAULT: Self = Self {
6465        capabilities: MavProtocolCapability::DEFAULT,
6466        uid: 0_u64,
6467        flight_sw_version: 0_u32,
6468        middleware_sw_version: 0_u32,
6469        os_sw_version: 0_u32,
6470        board_version: 0_u32,
6471        vendor_id: 0_u16,
6472        product_id: 0_u16,
6473        flight_custom_version: [0_u8; 8usize],
6474        middleware_custom_version: [0_u8; 8usize],
6475        os_custom_version: [0_u8; 8usize],
6476        uid2: [0_u8; 18usize],
6477    };
6478    #[cfg(feature = "arbitrary")]
6479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6480        use arbitrary::{Arbitrary, Unstructured};
6481        let mut buf = [0u8; 1024];
6482        rng.fill_bytes(&mut buf);
6483        let mut unstructured = Unstructured::new(&buf);
6484        Self::arbitrary(&mut unstructured).unwrap_or_default()
6485    }
6486}
6487impl Default for AUTOPILOT_VERSION_DATA {
6488    fn default() -> Self {
6489        Self::DEFAULT.clone()
6490    }
6491}
6492impl MessageData for AUTOPILOT_VERSION_DATA {
6493    type Message = MavMessage;
6494    const ID: u32 = 148u32;
6495    const NAME: &'static str = "AUTOPILOT_VERSION";
6496    const EXTRA_CRC: u8 = 178u8;
6497    const ENCODED_LEN: usize = 78usize;
6498    fn deser(
6499        _version: MavlinkVersion,
6500        __input: &[u8],
6501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6502        let avail_len = __input.len();
6503        let mut payload_buf = [0; Self::ENCODED_LEN];
6504        let mut buf = if avail_len < Self::ENCODED_LEN {
6505            payload_buf[0..avail_len].copy_from_slice(__input);
6506            Bytes::new(&payload_buf)
6507        } else {
6508            Bytes::new(__input)
6509        };
6510        let mut __struct = Self::default();
6511        let tmp = buf.get_u64_le();
6512        __struct.capabilities = MavProtocolCapability::from_bits(
6513            tmp & MavProtocolCapability::all().bits(),
6514        )
6515        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6516            flag_type: "MavProtocolCapability",
6517            value: tmp as u32,
6518        })?;
6519        __struct.uid = buf.get_u64_le();
6520        __struct.flight_sw_version = buf.get_u32_le();
6521        __struct.middleware_sw_version = buf.get_u32_le();
6522        __struct.os_sw_version = buf.get_u32_le();
6523        __struct.board_version = buf.get_u32_le();
6524        __struct.vendor_id = buf.get_u16_le();
6525        __struct.product_id = buf.get_u16_le();
6526        for v in &mut __struct.flight_custom_version {
6527            let val = buf.get_u8();
6528            *v = val;
6529        }
6530        for v in &mut __struct.middleware_custom_version {
6531            let val = buf.get_u8();
6532            *v = val;
6533        }
6534        for v in &mut __struct.os_custom_version {
6535            let val = buf.get_u8();
6536            *v = val;
6537        }
6538        for v in &mut __struct.uid2 {
6539            let val = buf.get_u8();
6540            *v = val;
6541        }
6542        Ok(__struct)
6543    }
6544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6545        let mut __tmp = BytesMut::new(bytes);
6546        #[allow(clippy::absurd_extreme_comparisons)]
6547        #[allow(unused_comparisons)]
6548        if __tmp.remaining() < Self::ENCODED_LEN {
6549            panic!(
6550                "buffer is too small (need {} bytes, but got {})",
6551                Self::ENCODED_LEN,
6552                __tmp.remaining(),
6553            )
6554        }
6555        __tmp.put_u64_le(self.capabilities.bits());
6556        __tmp.put_u64_le(self.uid);
6557        __tmp.put_u32_le(self.flight_sw_version);
6558        __tmp.put_u32_le(self.middleware_sw_version);
6559        __tmp.put_u32_le(self.os_sw_version);
6560        __tmp.put_u32_le(self.board_version);
6561        __tmp.put_u16_le(self.vendor_id);
6562        __tmp.put_u16_le(self.product_id);
6563        for val in &self.flight_custom_version {
6564            __tmp.put_u8(*val);
6565        }
6566        for val in &self.middleware_custom_version {
6567            __tmp.put_u8(*val);
6568        }
6569        for val in &self.os_custom_version {
6570            __tmp.put_u8(*val);
6571        }
6572        if matches!(version, MavlinkVersion::V2) {
6573            for val in &self.uid2 {
6574                __tmp.put_u8(*val);
6575            }
6576            let len = __tmp.len();
6577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6578        } else {
6579            __tmp.len()
6580        }
6581    }
6582}
6583#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6584#[doc = ""]
6585#[doc = "ID: 435"]
6586#[derive(Debug, Clone, PartialEq)]
6587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6589#[cfg_attr(feature = "ts", derive(TS))]
6590#[cfg_attr(feature = "ts", ts(export))]
6591pub struct AVAILABLE_MODES_DATA {
6592    #[doc = "A bitfield for use for autopilot-specific flags"]
6593    pub custom_mode: u32,
6594    #[doc = "Mode properties."]
6595    pub properties: MavModeProperty,
6596    #[doc = "The total number of available modes for the current vehicle type."]
6597    pub number_modes: u8,
6598    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6599    pub mode_index: u8,
6600    #[doc = "Standard mode."]
6601    pub standard_mode: MavStandardMode,
6602    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6603    #[cfg_attr(
6604        feature = "serde",
6605        serde(
6606            serialize_with = "crate::nulstr::serialize::<_, 35>",
6607            deserialize_with = "crate::nulstr::deserialize::<_, 35>"
6608        )
6609    )]
6610    #[cfg_attr(feature = "ts", ts(type = "string"))]
6611    pub mode_name: [u8; 35],
6612}
6613impl AVAILABLE_MODES_DATA {
6614    pub const ENCODED_LEN: usize = 46usize;
6615    pub const DEFAULT: Self = Self {
6616        custom_mode: 0_u32,
6617        properties: MavModeProperty::DEFAULT,
6618        number_modes: 0_u8,
6619        mode_index: 0_u8,
6620        standard_mode: MavStandardMode::DEFAULT,
6621        mode_name: [0_u8; 35usize],
6622    };
6623    #[cfg(feature = "arbitrary")]
6624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6625        use arbitrary::{Arbitrary, Unstructured};
6626        let mut buf = [0u8; 1024];
6627        rng.fill_bytes(&mut buf);
6628        let mut unstructured = Unstructured::new(&buf);
6629        Self::arbitrary(&mut unstructured).unwrap_or_default()
6630    }
6631}
6632impl Default for AVAILABLE_MODES_DATA {
6633    fn default() -> Self {
6634        Self::DEFAULT.clone()
6635    }
6636}
6637impl MessageData for AVAILABLE_MODES_DATA {
6638    type Message = MavMessage;
6639    const ID: u32 = 435u32;
6640    const NAME: &'static str = "AVAILABLE_MODES";
6641    const EXTRA_CRC: u8 = 134u8;
6642    const ENCODED_LEN: usize = 46usize;
6643    fn deser(
6644        _version: MavlinkVersion,
6645        __input: &[u8],
6646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6647        let avail_len = __input.len();
6648        let mut payload_buf = [0; Self::ENCODED_LEN];
6649        let mut buf = if avail_len < Self::ENCODED_LEN {
6650            payload_buf[0..avail_len].copy_from_slice(__input);
6651            Bytes::new(&payload_buf)
6652        } else {
6653            Bytes::new(__input)
6654        };
6655        let mut __struct = Self::default();
6656        __struct.custom_mode = buf.get_u32_le();
6657        let tmp = buf.get_u32_le();
6658        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6659            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6660                flag_type: "MavModeProperty",
6661                value: tmp as u32,
6662            })?;
6663        __struct.number_modes = buf.get_u8();
6664        __struct.mode_index = buf.get_u8();
6665        let tmp = buf.get_u8();
6666        __struct.standard_mode =
6667            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6668                enum_type: "MavStandardMode",
6669                value: tmp as u32,
6670            })?;
6671        for v in &mut __struct.mode_name {
6672            let val = buf.get_u8();
6673            *v = val;
6674        }
6675        Ok(__struct)
6676    }
6677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6678        let mut __tmp = BytesMut::new(bytes);
6679        #[allow(clippy::absurd_extreme_comparisons)]
6680        #[allow(unused_comparisons)]
6681        if __tmp.remaining() < Self::ENCODED_LEN {
6682            panic!(
6683                "buffer is too small (need {} bytes, but got {})",
6684                Self::ENCODED_LEN,
6685                __tmp.remaining(),
6686            )
6687        }
6688        __tmp.put_u32_le(self.custom_mode);
6689        __tmp.put_u32_le(self.properties.bits());
6690        __tmp.put_u8(self.number_modes);
6691        __tmp.put_u8(self.mode_index);
6692        __tmp.put_u8(self.standard_mode as u8);
6693        for val in &self.mode_name {
6694            __tmp.put_u8(*val);
6695        }
6696        if matches!(version, MavlinkVersion::V2) {
6697            let len = __tmp.len();
6698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6699        } else {
6700            __tmp.len()
6701        }
6702    }
6703}
6704#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6705#[doc = ""]
6706#[doc = "ID: 437"]
6707#[derive(Debug, Clone, PartialEq)]
6708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6710#[cfg_attr(feature = "ts", derive(TS))]
6711#[cfg_attr(feature = "ts", ts(export))]
6712pub struct AVAILABLE_MODES_MONITOR_DATA {
6713    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6714    pub seq: u8,
6715}
6716impl AVAILABLE_MODES_MONITOR_DATA {
6717    pub const ENCODED_LEN: usize = 1usize;
6718    pub const DEFAULT: Self = Self { seq: 0_u8 };
6719    #[cfg(feature = "arbitrary")]
6720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6721        use arbitrary::{Arbitrary, Unstructured};
6722        let mut buf = [0u8; 1024];
6723        rng.fill_bytes(&mut buf);
6724        let mut unstructured = Unstructured::new(&buf);
6725        Self::arbitrary(&mut unstructured).unwrap_or_default()
6726    }
6727}
6728impl Default for AVAILABLE_MODES_MONITOR_DATA {
6729    fn default() -> Self {
6730        Self::DEFAULT.clone()
6731    }
6732}
6733impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6734    type Message = MavMessage;
6735    const ID: u32 = 437u32;
6736    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6737    const EXTRA_CRC: u8 = 30u8;
6738    const ENCODED_LEN: usize = 1usize;
6739    fn deser(
6740        _version: MavlinkVersion,
6741        __input: &[u8],
6742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6743        let avail_len = __input.len();
6744        let mut payload_buf = [0; Self::ENCODED_LEN];
6745        let mut buf = if avail_len < Self::ENCODED_LEN {
6746            payload_buf[0..avail_len].copy_from_slice(__input);
6747            Bytes::new(&payload_buf)
6748        } else {
6749            Bytes::new(__input)
6750        };
6751        let mut __struct = Self::default();
6752        __struct.seq = buf.get_u8();
6753        Ok(__struct)
6754    }
6755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6756        let mut __tmp = BytesMut::new(bytes);
6757        #[allow(clippy::absurd_extreme_comparisons)]
6758        #[allow(unused_comparisons)]
6759        if __tmp.remaining() < Self::ENCODED_LEN {
6760            panic!(
6761                "buffer is too small (need {} bytes, but got {})",
6762                Self::ENCODED_LEN,
6763                __tmp.remaining(),
6764            )
6765        }
6766        __tmp.put_u8(self.seq);
6767        if matches!(version, MavlinkVersion::V2) {
6768            let len = __tmp.len();
6769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6770        } else {
6771            __tmp.len()
6772        }
6773    }
6774}
6775#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6776#[doc = ""]
6777#[doc = "ID: 372"]
6778#[derive(Debug, Clone, PartialEq)]
6779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6781#[cfg_attr(feature = "ts", derive(TS))]
6782#[cfg_attr(feature = "ts", ts(export))]
6783pub struct BATTERY_INFO_DATA {
6784    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6785    pub discharge_minimum_voltage: f32,
6786    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6787    pub charging_minimum_voltage: f32,
6788    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6789    pub resting_minimum_voltage: f32,
6790    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6791    pub charging_maximum_voltage: f32,
6792    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6793    pub charging_maximum_current: f32,
6794    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6795    pub nominal_voltage: f32,
6796    #[doc = "Maximum pack discharge current. 0: field not provided."]
6797    pub discharge_maximum_current: f32,
6798    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6799    pub discharge_maximum_burst_current: f32,
6800    #[doc = "Fully charged design capacity. 0: field not provided."]
6801    pub design_capacity: f32,
6802    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6803    pub full_charge_capacity: f32,
6804    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6805    pub cycle_count: u16,
6806    #[doc = "Battery weight. 0: field not provided."]
6807    pub weight: u16,
6808    #[doc = "Battery ID"]
6809    pub id: u8,
6810    #[doc = "Function of the battery."]
6811    pub battery_function: MavBatteryFunction,
6812    #[doc = "Type (chemistry) of the battery."]
6813    pub mavtype: MavBatteryType,
6814    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6815    pub state_of_health: u8,
6816    #[doc = "Number of battery cells in series. 0: field not provided."]
6817    pub cells_in_series: u8,
6818    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6819    #[cfg_attr(
6820        feature = "serde",
6821        serde(
6822            serialize_with = "crate::nulstr::serialize::<_, 9>",
6823            deserialize_with = "crate::nulstr::deserialize::<_, 9>"
6824        )
6825    )]
6826    #[cfg_attr(feature = "ts", ts(type = "string"))]
6827    pub manufacture_date: [u8; 9],
6828    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6829    #[cfg_attr(
6830        feature = "serde",
6831        serde(
6832            serialize_with = "crate::nulstr::serialize::<_, 32>",
6833            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
6834        )
6835    )]
6836    #[cfg_attr(feature = "ts", ts(type = "string"))]
6837    pub serial_number: [u8; 32],
6838    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6839    #[cfg_attr(
6840        feature = "serde",
6841        serde(
6842            serialize_with = "crate::nulstr::serialize::<_, 50>",
6843            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
6844        )
6845    )]
6846    #[cfg_attr(feature = "ts", ts(type = "string"))]
6847    pub name: [u8; 50],
6848}
6849impl BATTERY_INFO_DATA {
6850    pub const ENCODED_LEN: usize = 140usize;
6851    pub const DEFAULT: Self = Self {
6852        discharge_minimum_voltage: 0.0_f32,
6853        charging_minimum_voltage: 0.0_f32,
6854        resting_minimum_voltage: 0.0_f32,
6855        charging_maximum_voltage: 0.0_f32,
6856        charging_maximum_current: 0.0_f32,
6857        nominal_voltage: 0.0_f32,
6858        discharge_maximum_current: 0.0_f32,
6859        discharge_maximum_burst_current: 0.0_f32,
6860        design_capacity: 0.0_f32,
6861        full_charge_capacity: 0.0_f32,
6862        cycle_count: 0_u16,
6863        weight: 0_u16,
6864        id: 0_u8,
6865        battery_function: MavBatteryFunction::DEFAULT,
6866        mavtype: MavBatteryType::DEFAULT,
6867        state_of_health: 0_u8,
6868        cells_in_series: 0_u8,
6869        manufacture_date: [0_u8; 9usize],
6870        serial_number: [0_u8; 32usize],
6871        name: [0_u8; 50usize],
6872    };
6873    #[cfg(feature = "arbitrary")]
6874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6875        use arbitrary::{Arbitrary, Unstructured};
6876        let mut buf = [0u8; 1024];
6877        rng.fill_bytes(&mut buf);
6878        let mut unstructured = Unstructured::new(&buf);
6879        Self::arbitrary(&mut unstructured).unwrap_or_default()
6880    }
6881}
6882impl Default for BATTERY_INFO_DATA {
6883    fn default() -> Self {
6884        Self::DEFAULT.clone()
6885    }
6886}
6887impl MessageData for BATTERY_INFO_DATA {
6888    type Message = MavMessage;
6889    const ID: u32 = 372u32;
6890    const NAME: &'static str = "BATTERY_INFO";
6891    const EXTRA_CRC: u8 = 26u8;
6892    const ENCODED_LEN: usize = 140usize;
6893    fn deser(
6894        _version: MavlinkVersion,
6895        __input: &[u8],
6896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6897        let avail_len = __input.len();
6898        let mut payload_buf = [0; Self::ENCODED_LEN];
6899        let mut buf = if avail_len < Self::ENCODED_LEN {
6900            payload_buf[0..avail_len].copy_from_slice(__input);
6901            Bytes::new(&payload_buf)
6902        } else {
6903            Bytes::new(__input)
6904        };
6905        let mut __struct = Self::default();
6906        __struct.discharge_minimum_voltage = buf.get_f32_le();
6907        __struct.charging_minimum_voltage = buf.get_f32_le();
6908        __struct.resting_minimum_voltage = buf.get_f32_le();
6909        __struct.charging_maximum_voltage = buf.get_f32_le();
6910        __struct.charging_maximum_current = buf.get_f32_le();
6911        __struct.nominal_voltage = buf.get_f32_le();
6912        __struct.discharge_maximum_current = buf.get_f32_le();
6913        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6914        __struct.design_capacity = buf.get_f32_le();
6915        __struct.full_charge_capacity = buf.get_f32_le();
6916        __struct.cycle_count = buf.get_u16_le();
6917        __struct.weight = buf.get_u16_le();
6918        __struct.id = buf.get_u8();
6919        let tmp = buf.get_u8();
6920        __struct.battery_function =
6921            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6922                enum_type: "MavBatteryFunction",
6923                value: tmp as u32,
6924            })?;
6925        let tmp = buf.get_u8();
6926        __struct.mavtype =
6927            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6928                enum_type: "MavBatteryType",
6929                value: tmp as u32,
6930            })?;
6931        __struct.state_of_health = buf.get_u8();
6932        __struct.cells_in_series = buf.get_u8();
6933        for v in &mut __struct.manufacture_date {
6934            let val = buf.get_u8();
6935            *v = val;
6936        }
6937        for v in &mut __struct.serial_number {
6938            let val = buf.get_u8();
6939            *v = val;
6940        }
6941        for v in &mut __struct.name {
6942            let val = buf.get_u8();
6943            *v = val;
6944        }
6945        Ok(__struct)
6946    }
6947    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6948        let mut __tmp = BytesMut::new(bytes);
6949        #[allow(clippy::absurd_extreme_comparisons)]
6950        #[allow(unused_comparisons)]
6951        if __tmp.remaining() < Self::ENCODED_LEN {
6952            panic!(
6953                "buffer is too small (need {} bytes, but got {})",
6954                Self::ENCODED_LEN,
6955                __tmp.remaining(),
6956            )
6957        }
6958        __tmp.put_f32_le(self.discharge_minimum_voltage);
6959        __tmp.put_f32_le(self.charging_minimum_voltage);
6960        __tmp.put_f32_le(self.resting_minimum_voltage);
6961        __tmp.put_f32_le(self.charging_maximum_voltage);
6962        __tmp.put_f32_le(self.charging_maximum_current);
6963        __tmp.put_f32_le(self.nominal_voltage);
6964        __tmp.put_f32_le(self.discharge_maximum_current);
6965        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6966        __tmp.put_f32_le(self.design_capacity);
6967        __tmp.put_f32_le(self.full_charge_capacity);
6968        __tmp.put_u16_le(self.cycle_count);
6969        __tmp.put_u16_le(self.weight);
6970        __tmp.put_u8(self.id);
6971        __tmp.put_u8(self.battery_function as u8);
6972        __tmp.put_u8(self.mavtype as u8);
6973        __tmp.put_u8(self.state_of_health);
6974        __tmp.put_u8(self.cells_in_series);
6975        for val in &self.manufacture_date {
6976            __tmp.put_u8(*val);
6977        }
6978        for val in &self.serial_number {
6979            __tmp.put_u8(*val);
6980        }
6981        for val in &self.name {
6982            __tmp.put_u8(*val);
6983        }
6984        if matches!(version, MavlinkVersion::V2) {
6985            let len = __tmp.len();
6986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6987        } else {
6988            __tmp.len()
6989        }
6990    }
6991}
6992#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6993#[doc = ""]
6994#[doc = "ID: 147"]
6995#[derive(Debug, Clone, PartialEq)]
6996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6998#[cfg_attr(feature = "ts", derive(TS))]
6999#[cfg_attr(feature = "ts", ts(export))]
7000pub struct BATTERY_STATUS_DATA {
7001    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7002    pub current_consumed: i32,
7003    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7004    pub energy_consumed: i32,
7005    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7006    pub temperature: i16,
7007    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7010    pub voltages: [u16; 10],
7011    #[doc = "Battery current, -1: autopilot does not measure the current"]
7012    pub current_battery: i16,
7013    #[doc = "Battery ID"]
7014    pub id: u8,
7015    #[doc = "Function of the battery"]
7016    pub battery_function: MavBatteryFunction,
7017    #[doc = "Type (chemistry) of the battery"]
7018    pub mavtype: MavBatteryType,
7019    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7020    pub battery_remaining: i8,
7021    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7023    pub time_remaining: i32,
7024    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7025    #[cfg_attr(feature = "serde", serde(default))]
7026    pub charge_state: MavBatteryChargeState,
7027    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7028    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7030    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7031    pub voltages_ext: [u16; 4],
7032    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7033    #[cfg_attr(feature = "serde", serde(default))]
7034    pub mode: MavBatteryMode,
7035    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7036    #[cfg_attr(feature = "serde", serde(default))]
7037    pub fault_bitmask: MavBatteryFault,
7038}
7039impl BATTERY_STATUS_DATA {
7040    pub const ENCODED_LEN: usize = 54usize;
7041    pub const DEFAULT: Self = Self {
7042        current_consumed: 0_i32,
7043        energy_consumed: 0_i32,
7044        temperature: 0_i16,
7045        voltages: [0_u16; 10usize],
7046        current_battery: 0_i16,
7047        id: 0_u8,
7048        battery_function: MavBatteryFunction::DEFAULT,
7049        mavtype: MavBatteryType::DEFAULT,
7050        battery_remaining: 0_i8,
7051        time_remaining: 0_i32,
7052        charge_state: MavBatteryChargeState::DEFAULT,
7053        voltages_ext: [0_u16; 4usize],
7054        mode: MavBatteryMode::DEFAULT,
7055        fault_bitmask: MavBatteryFault::DEFAULT,
7056    };
7057    #[cfg(feature = "arbitrary")]
7058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7059        use arbitrary::{Arbitrary, Unstructured};
7060        let mut buf = [0u8; 1024];
7061        rng.fill_bytes(&mut buf);
7062        let mut unstructured = Unstructured::new(&buf);
7063        Self::arbitrary(&mut unstructured).unwrap_or_default()
7064    }
7065}
7066impl Default for BATTERY_STATUS_DATA {
7067    fn default() -> Self {
7068        Self::DEFAULT.clone()
7069    }
7070}
7071impl MessageData for BATTERY_STATUS_DATA {
7072    type Message = MavMessage;
7073    const ID: u32 = 147u32;
7074    const NAME: &'static str = "BATTERY_STATUS";
7075    const EXTRA_CRC: u8 = 154u8;
7076    const ENCODED_LEN: usize = 54usize;
7077    fn deser(
7078        _version: MavlinkVersion,
7079        __input: &[u8],
7080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7081        let avail_len = __input.len();
7082        let mut payload_buf = [0; Self::ENCODED_LEN];
7083        let mut buf = if avail_len < Self::ENCODED_LEN {
7084            payload_buf[0..avail_len].copy_from_slice(__input);
7085            Bytes::new(&payload_buf)
7086        } else {
7087            Bytes::new(__input)
7088        };
7089        let mut __struct = Self::default();
7090        __struct.current_consumed = buf.get_i32_le();
7091        __struct.energy_consumed = buf.get_i32_le();
7092        __struct.temperature = buf.get_i16_le();
7093        for v in &mut __struct.voltages {
7094            let val = buf.get_u16_le();
7095            *v = val;
7096        }
7097        __struct.current_battery = buf.get_i16_le();
7098        __struct.id = buf.get_u8();
7099        let tmp = buf.get_u8();
7100        __struct.battery_function =
7101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7102                enum_type: "MavBatteryFunction",
7103                value: tmp as u32,
7104            })?;
7105        let tmp = buf.get_u8();
7106        __struct.mavtype =
7107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7108                enum_type: "MavBatteryType",
7109                value: tmp as u32,
7110            })?;
7111        __struct.battery_remaining = buf.get_i8();
7112        __struct.time_remaining = buf.get_i32_le();
7113        let tmp = buf.get_u8();
7114        __struct.charge_state =
7115            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7116                enum_type: "MavBatteryChargeState",
7117                value: tmp as u32,
7118            })?;
7119        for v in &mut __struct.voltages_ext {
7120            let val = buf.get_u16_le();
7121            *v = val;
7122        }
7123        let tmp = buf.get_u8();
7124        __struct.mode =
7125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7126                enum_type: "MavBatteryMode",
7127                value: tmp as u32,
7128            })?;
7129        let tmp = buf.get_u32_le();
7130        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7131            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7132                flag_type: "MavBatteryFault",
7133                value: tmp as u32,
7134            })?;
7135        Ok(__struct)
7136    }
7137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7138        let mut __tmp = BytesMut::new(bytes);
7139        #[allow(clippy::absurd_extreme_comparisons)]
7140        #[allow(unused_comparisons)]
7141        if __tmp.remaining() < Self::ENCODED_LEN {
7142            panic!(
7143                "buffer is too small (need {} bytes, but got {})",
7144                Self::ENCODED_LEN,
7145                __tmp.remaining(),
7146            )
7147        }
7148        __tmp.put_i32_le(self.current_consumed);
7149        __tmp.put_i32_le(self.energy_consumed);
7150        __tmp.put_i16_le(self.temperature);
7151        for val in &self.voltages {
7152            __tmp.put_u16_le(*val);
7153        }
7154        __tmp.put_i16_le(self.current_battery);
7155        __tmp.put_u8(self.id);
7156        __tmp.put_u8(self.battery_function as u8);
7157        __tmp.put_u8(self.mavtype as u8);
7158        __tmp.put_i8(self.battery_remaining);
7159        if matches!(version, MavlinkVersion::V2) {
7160            __tmp.put_i32_le(self.time_remaining);
7161            __tmp.put_u8(self.charge_state as u8);
7162            for val in &self.voltages_ext {
7163                __tmp.put_u16_le(*val);
7164            }
7165            __tmp.put_u8(self.mode as u8);
7166            __tmp.put_u32_le(self.fault_bitmask.bits());
7167            let len = __tmp.len();
7168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7169        } else {
7170            __tmp.len()
7171        }
7172    }
7173}
7174#[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
7175#[doc = ""]
7176#[doc = "ID: 369"]
7177#[derive(Debug, Clone, PartialEq)]
7178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7180#[cfg_attr(feature = "ts", derive(TS))]
7181#[cfg_attr(feature = "ts", ts(export))]
7182pub struct BATTERY_STATUS_V2_DATA {
7183    #[doc = "Battery voltage (total). NaN: field not provided."]
7184    pub voltage: f32,
7185    #[doc = "Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided."]
7186    pub current: f32,
7187    #[doc = "Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL."]
7188    pub capacity_consumed: f32,
7189    #[doc = "Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered."]
7190    pub capacity_remaining: f32,
7191    #[doc = "Fault, health, readiness, and other status indications."]
7192    pub status_flags: MavBatteryStatusFlags,
7193    #[doc = "Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided."]
7194    pub temperature: i16,
7195    #[doc = "Battery ID"]
7196    pub id: u8,
7197    #[doc = "Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided."]
7198    pub percent_remaining: u8,
7199}
7200impl BATTERY_STATUS_V2_DATA {
7201    pub const ENCODED_LEN: usize = 24usize;
7202    pub const DEFAULT: Self = Self {
7203        voltage: 0.0_f32,
7204        current: 0.0_f32,
7205        capacity_consumed: 0.0_f32,
7206        capacity_remaining: 0.0_f32,
7207        status_flags: MavBatteryStatusFlags::DEFAULT,
7208        temperature: 0_i16,
7209        id: 0_u8,
7210        percent_remaining: 0_u8,
7211    };
7212    #[cfg(feature = "arbitrary")]
7213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7214        use arbitrary::{Arbitrary, Unstructured};
7215        let mut buf = [0u8; 1024];
7216        rng.fill_bytes(&mut buf);
7217        let mut unstructured = Unstructured::new(&buf);
7218        Self::arbitrary(&mut unstructured).unwrap_or_default()
7219    }
7220}
7221impl Default for BATTERY_STATUS_V2_DATA {
7222    fn default() -> Self {
7223        Self::DEFAULT.clone()
7224    }
7225}
7226impl MessageData for BATTERY_STATUS_V2_DATA {
7227    type Message = MavMessage;
7228    const ID: u32 = 369u32;
7229    const NAME: &'static str = "BATTERY_STATUS_V2";
7230    const EXTRA_CRC: u8 = 151u8;
7231    const ENCODED_LEN: usize = 24usize;
7232    fn deser(
7233        _version: MavlinkVersion,
7234        __input: &[u8],
7235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7236        let avail_len = __input.len();
7237        let mut payload_buf = [0; Self::ENCODED_LEN];
7238        let mut buf = if avail_len < Self::ENCODED_LEN {
7239            payload_buf[0..avail_len].copy_from_slice(__input);
7240            Bytes::new(&payload_buf)
7241        } else {
7242            Bytes::new(__input)
7243        };
7244        let mut __struct = Self::default();
7245        __struct.voltage = buf.get_f32_le();
7246        __struct.current = buf.get_f32_le();
7247        __struct.capacity_consumed = buf.get_f32_le();
7248        __struct.capacity_remaining = buf.get_f32_le();
7249        let tmp = buf.get_u32_le();
7250        __struct.status_flags = MavBatteryStatusFlags::from_bits(
7251            tmp & MavBatteryStatusFlags::all().bits(),
7252        )
7253        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7254            flag_type: "MavBatteryStatusFlags",
7255            value: tmp as u32,
7256        })?;
7257        __struct.temperature = buf.get_i16_le();
7258        __struct.id = buf.get_u8();
7259        __struct.percent_remaining = buf.get_u8();
7260        Ok(__struct)
7261    }
7262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7263        let mut __tmp = BytesMut::new(bytes);
7264        #[allow(clippy::absurd_extreme_comparisons)]
7265        #[allow(unused_comparisons)]
7266        if __tmp.remaining() < Self::ENCODED_LEN {
7267            panic!(
7268                "buffer is too small (need {} bytes, but got {})",
7269                Self::ENCODED_LEN,
7270                __tmp.remaining(),
7271            )
7272        }
7273        __tmp.put_f32_le(self.voltage);
7274        __tmp.put_f32_le(self.current);
7275        __tmp.put_f32_le(self.capacity_consumed);
7276        __tmp.put_f32_le(self.capacity_remaining);
7277        __tmp.put_u32_le(self.status_flags.bits());
7278        __tmp.put_i16_le(self.temperature);
7279        __tmp.put_u8(self.id);
7280        __tmp.put_u8(self.percent_remaining);
7281        if matches!(version, MavlinkVersion::V2) {
7282            let len = __tmp.len();
7283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7284        } else {
7285            __tmp.len()
7286        }
7287    }
7288}
7289#[doc = "Report button state change."]
7290#[doc = ""]
7291#[doc = "ID: 257"]
7292#[derive(Debug, Clone, PartialEq)]
7293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7295#[cfg_attr(feature = "ts", derive(TS))]
7296#[cfg_attr(feature = "ts", ts(export))]
7297pub struct BUTTON_CHANGE_DATA {
7298    #[doc = "Timestamp (time since system boot)."]
7299    pub time_boot_ms: u32,
7300    #[doc = "Time of last change of button state."]
7301    pub last_change_ms: u32,
7302    #[doc = "Bitmap for state of buttons."]
7303    pub state: u8,
7304}
7305impl BUTTON_CHANGE_DATA {
7306    pub const ENCODED_LEN: usize = 9usize;
7307    pub const DEFAULT: Self = Self {
7308        time_boot_ms: 0_u32,
7309        last_change_ms: 0_u32,
7310        state: 0_u8,
7311    };
7312    #[cfg(feature = "arbitrary")]
7313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7314        use arbitrary::{Arbitrary, Unstructured};
7315        let mut buf = [0u8; 1024];
7316        rng.fill_bytes(&mut buf);
7317        let mut unstructured = Unstructured::new(&buf);
7318        Self::arbitrary(&mut unstructured).unwrap_or_default()
7319    }
7320}
7321impl Default for BUTTON_CHANGE_DATA {
7322    fn default() -> Self {
7323        Self::DEFAULT.clone()
7324    }
7325}
7326impl MessageData for BUTTON_CHANGE_DATA {
7327    type Message = MavMessage;
7328    const ID: u32 = 257u32;
7329    const NAME: &'static str = "BUTTON_CHANGE";
7330    const EXTRA_CRC: u8 = 131u8;
7331    const ENCODED_LEN: usize = 9usize;
7332    fn deser(
7333        _version: MavlinkVersion,
7334        __input: &[u8],
7335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7336        let avail_len = __input.len();
7337        let mut payload_buf = [0; Self::ENCODED_LEN];
7338        let mut buf = if avail_len < Self::ENCODED_LEN {
7339            payload_buf[0..avail_len].copy_from_slice(__input);
7340            Bytes::new(&payload_buf)
7341        } else {
7342            Bytes::new(__input)
7343        };
7344        let mut __struct = Self::default();
7345        __struct.time_boot_ms = buf.get_u32_le();
7346        __struct.last_change_ms = buf.get_u32_le();
7347        __struct.state = buf.get_u8();
7348        Ok(__struct)
7349    }
7350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7351        let mut __tmp = BytesMut::new(bytes);
7352        #[allow(clippy::absurd_extreme_comparisons)]
7353        #[allow(unused_comparisons)]
7354        if __tmp.remaining() < Self::ENCODED_LEN {
7355            panic!(
7356                "buffer is too small (need {} bytes, but got {})",
7357                Self::ENCODED_LEN,
7358                __tmp.remaining(),
7359            )
7360        }
7361        __tmp.put_u32_le(self.time_boot_ms);
7362        __tmp.put_u32_le(self.last_change_ms);
7363        __tmp.put_u8(self.state);
7364        if matches!(version, MavlinkVersion::V2) {
7365            let len = __tmp.len();
7366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7367        } else {
7368            __tmp.len()
7369        }
7370    }
7371}
7372#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7373#[doc = ""]
7374#[doc = "ID: 262"]
7375#[derive(Debug, Clone, PartialEq)]
7376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7378#[cfg_attr(feature = "ts", derive(TS))]
7379#[cfg_attr(feature = "ts", ts(export))]
7380pub struct CAMERA_CAPTURE_STATUS_DATA {
7381    #[doc = "Timestamp (time since system boot)."]
7382    pub time_boot_ms: u32,
7383    #[doc = "Image capture interval"]
7384    pub image_interval: f32,
7385    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7386    pub recording_time_ms: u32,
7387    #[doc = "Available storage capacity."]
7388    pub available_capacity: f32,
7389    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7390    pub image_status: u8,
7391    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7392    pub video_status: u8,
7393    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7394    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7395    pub image_count: i32,
7396    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7398    pub camera_device_id: u8,
7399}
7400impl CAMERA_CAPTURE_STATUS_DATA {
7401    pub const ENCODED_LEN: usize = 23usize;
7402    pub const DEFAULT: Self = Self {
7403        time_boot_ms: 0_u32,
7404        image_interval: 0.0_f32,
7405        recording_time_ms: 0_u32,
7406        available_capacity: 0.0_f32,
7407        image_status: 0_u8,
7408        video_status: 0_u8,
7409        image_count: 0_i32,
7410        camera_device_id: 0_u8,
7411    };
7412    #[cfg(feature = "arbitrary")]
7413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7414        use arbitrary::{Arbitrary, Unstructured};
7415        let mut buf = [0u8; 1024];
7416        rng.fill_bytes(&mut buf);
7417        let mut unstructured = Unstructured::new(&buf);
7418        Self::arbitrary(&mut unstructured).unwrap_or_default()
7419    }
7420}
7421impl Default for CAMERA_CAPTURE_STATUS_DATA {
7422    fn default() -> Self {
7423        Self::DEFAULT.clone()
7424    }
7425}
7426impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7427    type Message = MavMessage;
7428    const ID: u32 = 262u32;
7429    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7430    const EXTRA_CRC: u8 = 12u8;
7431    const ENCODED_LEN: usize = 23usize;
7432    fn deser(
7433        _version: MavlinkVersion,
7434        __input: &[u8],
7435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7436        let avail_len = __input.len();
7437        let mut payload_buf = [0; Self::ENCODED_LEN];
7438        let mut buf = if avail_len < Self::ENCODED_LEN {
7439            payload_buf[0..avail_len].copy_from_slice(__input);
7440            Bytes::new(&payload_buf)
7441        } else {
7442            Bytes::new(__input)
7443        };
7444        let mut __struct = Self::default();
7445        __struct.time_boot_ms = buf.get_u32_le();
7446        __struct.image_interval = buf.get_f32_le();
7447        __struct.recording_time_ms = buf.get_u32_le();
7448        __struct.available_capacity = buf.get_f32_le();
7449        __struct.image_status = buf.get_u8();
7450        __struct.video_status = buf.get_u8();
7451        __struct.image_count = buf.get_i32_le();
7452        __struct.camera_device_id = buf.get_u8();
7453        Ok(__struct)
7454    }
7455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7456        let mut __tmp = BytesMut::new(bytes);
7457        #[allow(clippy::absurd_extreme_comparisons)]
7458        #[allow(unused_comparisons)]
7459        if __tmp.remaining() < Self::ENCODED_LEN {
7460            panic!(
7461                "buffer is too small (need {} bytes, but got {})",
7462                Self::ENCODED_LEN,
7463                __tmp.remaining(),
7464            )
7465        }
7466        __tmp.put_u32_le(self.time_boot_ms);
7467        __tmp.put_f32_le(self.image_interval);
7468        __tmp.put_u32_le(self.recording_time_ms);
7469        __tmp.put_f32_le(self.available_capacity);
7470        __tmp.put_u8(self.image_status);
7471        __tmp.put_u8(self.video_status);
7472        if matches!(version, MavlinkVersion::V2) {
7473            __tmp.put_i32_le(self.image_count);
7474            __tmp.put_u8(self.camera_device_id);
7475            let len = __tmp.len();
7476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7477        } else {
7478            __tmp.len()
7479        }
7480    }
7481}
7482#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7483#[doc = ""]
7484#[doc = "ID: 271"]
7485#[derive(Debug, Clone, PartialEq)]
7486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7488#[cfg_attr(feature = "ts", derive(TS))]
7489#[cfg_attr(feature = "ts", ts(export))]
7490pub struct CAMERA_FOV_STATUS_DATA {
7491    #[doc = "Timestamp (time since system boot)."]
7492    pub time_boot_ms: u32,
7493    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7494    pub lat_camera: i32,
7495    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7496    pub lon_camera: i32,
7497    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7498    pub alt_camera: i32,
7499    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7500    pub lat_image: i32,
7501    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7502    pub lon_image: i32,
7503    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7504    pub alt_image: i32,
7505    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7507    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7508    pub q: [f32; 4],
7509    #[doc = "Horizontal field of view (NaN if unknown)."]
7510    pub hfov: f32,
7511    #[doc = "Vertical field of view (NaN if unknown)."]
7512    pub vfov: f32,
7513    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7514    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7515    pub camera_device_id: u8,
7516}
7517impl CAMERA_FOV_STATUS_DATA {
7518    pub const ENCODED_LEN: usize = 53usize;
7519    pub const DEFAULT: Self = Self {
7520        time_boot_ms: 0_u32,
7521        lat_camera: 0_i32,
7522        lon_camera: 0_i32,
7523        alt_camera: 0_i32,
7524        lat_image: 0_i32,
7525        lon_image: 0_i32,
7526        alt_image: 0_i32,
7527        q: [0.0_f32; 4usize],
7528        hfov: 0.0_f32,
7529        vfov: 0.0_f32,
7530        camera_device_id: 0_u8,
7531    };
7532    #[cfg(feature = "arbitrary")]
7533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7534        use arbitrary::{Arbitrary, Unstructured};
7535        let mut buf = [0u8; 1024];
7536        rng.fill_bytes(&mut buf);
7537        let mut unstructured = Unstructured::new(&buf);
7538        Self::arbitrary(&mut unstructured).unwrap_or_default()
7539    }
7540}
7541impl Default for CAMERA_FOV_STATUS_DATA {
7542    fn default() -> Self {
7543        Self::DEFAULT.clone()
7544    }
7545}
7546impl MessageData for CAMERA_FOV_STATUS_DATA {
7547    type Message = MavMessage;
7548    const ID: u32 = 271u32;
7549    const NAME: &'static str = "CAMERA_FOV_STATUS";
7550    const EXTRA_CRC: u8 = 22u8;
7551    const ENCODED_LEN: usize = 53usize;
7552    fn deser(
7553        _version: MavlinkVersion,
7554        __input: &[u8],
7555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7556        let avail_len = __input.len();
7557        let mut payload_buf = [0; Self::ENCODED_LEN];
7558        let mut buf = if avail_len < Self::ENCODED_LEN {
7559            payload_buf[0..avail_len].copy_from_slice(__input);
7560            Bytes::new(&payload_buf)
7561        } else {
7562            Bytes::new(__input)
7563        };
7564        let mut __struct = Self::default();
7565        __struct.time_boot_ms = buf.get_u32_le();
7566        __struct.lat_camera = buf.get_i32_le();
7567        __struct.lon_camera = buf.get_i32_le();
7568        __struct.alt_camera = buf.get_i32_le();
7569        __struct.lat_image = buf.get_i32_le();
7570        __struct.lon_image = buf.get_i32_le();
7571        __struct.alt_image = buf.get_i32_le();
7572        for v in &mut __struct.q {
7573            let val = buf.get_f32_le();
7574            *v = val;
7575        }
7576        __struct.hfov = buf.get_f32_le();
7577        __struct.vfov = buf.get_f32_le();
7578        __struct.camera_device_id = buf.get_u8();
7579        Ok(__struct)
7580    }
7581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7582        let mut __tmp = BytesMut::new(bytes);
7583        #[allow(clippy::absurd_extreme_comparisons)]
7584        #[allow(unused_comparisons)]
7585        if __tmp.remaining() < Self::ENCODED_LEN {
7586            panic!(
7587                "buffer is too small (need {} bytes, but got {})",
7588                Self::ENCODED_LEN,
7589                __tmp.remaining(),
7590            )
7591        }
7592        __tmp.put_u32_le(self.time_boot_ms);
7593        __tmp.put_i32_le(self.lat_camera);
7594        __tmp.put_i32_le(self.lon_camera);
7595        __tmp.put_i32_le(self.alt_camera);
7596        __tmp.put_i32_le(self.lat_image);
7597        __tmp.put_i32_le(self.lon_image);
7598        __tmp.put_i32_le(self.alt_image);
7599        for val in &self.q {
7600            __tmp.put_f32_le(*val);
7601        }
7602        __tmp.put_f32_le(self.hfov);
7603        __tmp.put_f32_le(self.vfov);
7604        if matches!(version, MavlinkVersion::V2) {
7605            __tmp.put_u8(self.camera_device_id);
7606            let len = __tmp.len();
7607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7608        } else {
7609            __tmp.len()
7610        }
7611    }
7612}
7613#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7614#[doc = ""]
7615#[doc = "ID: 263"]
7616#[derive(Debug, Clone, PartialEq)]
7617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7619#[cfg_attr(feature = "ts", derive(TS))]
7620#[cfg_attr(feature = "ts", ts(export))]
7621pub struct CAMERA_IMAGE_CAPTURED_DATA {
7622    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7623    pub time_utc: u64,
7624    #[doc = "Timestamp (time since system boot)."]
7625    pub time_boot_ms: u32,
7626    #[doc = "Latitude where image was taken"]
7627    pub lat: i32,
7628    #[doc = "Longitude where capture was taken"]
7629    pub lon: i32,
7630    #[doc = "Altitude (MSL) where image was taken"]
7631    pub alt: i32,
7632    #[doc = "Altitude above ground"]
7633    pub relative_alt: i32,
7634    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7635    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7636    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7637    pub q: [f32; 4],
7638    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7639    pub image_index: i32,
7640    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7641    pub camera_id: u8,
7642    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7643    pub capture_result: i8,
7644    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7645    #[cfg_attr(
7646        feature = "serde",
7647        serde(
7648            serialize_with = "crate::nulstr::serialize::<_, 205>",
7649            deserialize_with = "crate::nulstr::deserialize::<_, 205>"
7650        )
7651    )]
7652    #[cfg_attr(feature = "ts", ts(type = "string"))]
7653    pub file_url: [u8; 205],
7654}
7655impl CAMERA_IMAGE_CAPTURED_DATA {
7656    pub const ENCODED_LEN: usize = 255usize;
7657    pub const DEFAULT: Self = Self {
7658        time_utc: 0_u64,
7659        time_boot_ms: 0_u32,
7660        lat: 0_i32,
7661        lon: 0_i32,
7662        alt: 0_i32,
7663        relative_alt: 0_i32,
7664        q: [0.0_f32; 4usize],
7665        image_index: 0_i32,
7666        camera_id: 0_u8,
7667        capture_result: 0_i8,
7668        file_url: [0_u8; 205usize],
7669    };
7670    #[cfg(feature = "arbitrary")]
7671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7672        use arbitrary::{Arbitrary, Unstructured};
7673        let mut buf = [0u8; 1024];
7674        rng.fill_bytes(&mut buf);
7675        let mut unstructured = Unstructured::new(&buf);
7676        Self::arbitrary(&mut unstructured).unwrap_or_default()
7677    }
7678}
7679impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7680    fn default() -> Self {
7681        Self::DEFAULT.clone()
7682    }
7683}
7684impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7685    type Message = MavMessage;
7686    const ID: u32 = 263u32;
7687    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7688    const EXTRA_CRC: u8 = 133u8;
7689    const ENCODED_LEN: usize = 255usize;
7690    fn deser(
7691        _version: MavlinkVersion,
7692        __input: &[u8],
7693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7694        let avail_len = __input.len();
7695        let mut payload_buf = [0; Self::ENCODED_LEN];
7696        let mut buf = if avail_len < Self::ENCODED_LEN {
7697            payload_buf[0..avail_len].copy_from_slice(__input);
7698            Bytes::new(&payload_buf)
7699        } else {
7700            Bytes::new(__input)
7701        };
7702        let mut __struct = Self::default();
7703        __struct.time_utc = buf.get_u64_le();
7704        __struct.time_boot_ms = buf.get_u32_le();
7705        __struct.lat = buf.get_i32_le();
7706        __struct.lon = buf.get_i32_le();
7707        __struct.alt = buf.get_i32_le();
7708        __struct.relative_alt = buf.get_i32_le();
7709        for v in &mut __struct.q {
7710            let val = buf.get_f32_le();
7711            *v = val;
7712        }
7713        __struct.image_index = buf.get_i32_le();
7714        __struct.camera_id = buf.get_u8();
7715        __struct.capture_result = buf.get_i8();
7716        for v in &mut __struct.file_url {
7717            let val = buf.get_u8();
7718            *v = val;
7719        }
7720        Ok(__struct)
7721    }
7722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7723        let mut __tmp = BytesMut::new(bytes);
7724        #[allow(clippy::absurd_extreme_comparisons)]
7725        #[allow(unused_comparisons)]
7726        if __tmp.remaining() < Self::ENCODED_LEN {
7727            panic!(
7728                "buffer is too small (need {} bytes, but got {})",
7729                Self::ENCODED_LEN,
7730                __tmp.remaining(),
7731            )
7732        }
7733        __tmp.put_u64_le(self.time_utc);
7734        __tmp.put_u32_le(self.time_boot_ms);
7735        __tmp.put_i32_le(self.lat);
7736        __tmp.put_i32_le(self.lon);
7737        __tmp.put_i32_le(self.alt);
7738        __tmp.put_i32_le(self.relative_alt);
7739        for val in &self.q {
7740            __tmp.put_f32_le(*val);
7741        }
7742        __tmp.put_i32_le(self.image_index);
7743        __tmp.put_u8(self.camera_id);
7744        __tmp.put_i8(self.capture_result);
7745        for val in &self.file_url {
7746            __tmp.put_u8(*val);
7747        }
7748        if matches!(version, MavlinkVersion::V2) {
7749            let len = __tmp.len();
7750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7751        } else {
7752            __tmp.len()
7753        }
7754    }
7755}
7756#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7757#[doc = ""]
7758#[doc = "ID: 259"]
7759#[derive(Debug, Clone, PartialEq)]
7760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7762#[cfg_attr(feature = "ts", derive(TS))]
7763#[cfg_attr(feature = "ts", ts(export))]
7764pub struct CAMERA_INFORMATION_DATA {
7765    #[doc = "Timestamp (time since system boot)."]
7766    pub time_boot_ms: u32,
7767    #[doc = "0xff). Use 0 if not known."]
7768    pub firmware_version: u32,
7769    #[doc = "Focal length. Use NaN if not known."]
7770    pub focal_length: f32,
7771    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7772    pub sensor_size_h: f32,
7773    #[doc = "Image sensor size vertical. Use NaN if not known."]
7774    pub sensor_size_v: f32,
7775    #[doc = "Bitmap of camera capability flags."]
7776    pub flags: CameraCapFlags,
7777    #[doc = "Horizontal image resolution. Use 0 if not known."]
7778    pub resolution_h: u16,
7779    #[doc = "Vertical image resolution. Use 0 if not known."]
7780    pub resolution_v: u16,
7781    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7782    pub cam_definition_version: u16,
7783    #[doc = "Name of the camera vendor"]
7784    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7785    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7786    pub vendor_name: [u8; 32],
7787    #[doc = "Name of the camera model"]
7788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7789    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7790    pub model_name: [u8; 32],
7791    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7792    pub lens_id: u8,
7793    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7794    #[cfg_attr(
7795        feature = "serde",
7796        serde(
7797            serialize_with = "crate::nulstr::serialize::<_, 140>",
7798            deserialize_with = "crate::nulstr::deserialize::<_, 140>"
7799        )
7800    )]
7801    #[cfg_attr(feature = "ts", ts(type = "string"))]
7802    pub cam_definition_uri: [u8; 140],
7803    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7804    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7805    pub gimbal_device_id: u8,
7806    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7808    pub camera_device_id: u8,
7809}
7810impl CAMERA_INFORMATION_DATA {
7811    pub const ENCODED_LEN: usize = 237usize;
7812    pub const DEFAULT: Self = Self {
7813        time_boot_ms: 0_u32,
7814        firmware_version: 0_u32,
7815        focal_length: 0.0_f32,
7816        sensor_size_h: 0.0_f32,
7817        sensor_size_v: 0.0_f32,
7818        flags: CameraCapFlags::DEFAULT,
7819        resolution_h: 0_u16,
7820        resolution_v: 0_u16,
7821        cam_definition_version: 0_u16,
7822        vendor_name: [0_u8; 32usize],
7823        model_name: [0_u8; 32usize],
7824        lens_id: 0_u8,
7825        cam_definition_uri: [0_u8; 140usize],
7826        gimbal_device_id: 0_u8,
7827        camera_device_id: 0_u8,
7828    };
7829    #[cfg(feature = "arbitrary")]
7830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7831        use arbitrary::{Arbitrary, Unstructured};
7832        let mut buf = [0u8; 1024];
7833        rng.fill_bytes(&mut buf);
7834        let mut unstructured = Unstructured::new(&buf);
7835        Self::arbitrary(&mut unstructured).unwrap_or_default()
7836    }
7837}
7838impl Default for CAMERA_INFORMATION_DATA {
7839    fn default() -> Self {
7840        Self::DEFAULT.clone()
7841    }
7842}
7843impl MessageData for CAMERA_INFORMATION_DATA {
7844    type Message = MavMessage;
7845    const ID: u32 = 259u32;
7846    const NAME: &'static str = "CAMERA_INFORMATION";
7847    const EXTRA_CRC: u8 = 92u8;
7848    const ENCODED_LEN: usize = 237usize;
7849    fn deser(
7850        _version: MavlinkVersion,
7851        __input: &[u8],
7852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7853        let avail_len = __input.len();
7854        let mut payload_buf = [0; Self::ENCODED_LEN];
7855        let mut buf = if avail_len < Self::ENCODED_LEN {
7856            payload_buf[0..avail_len].copy_from_slice(__input);
7857            Bytes::new(&payload_buf)
7858        } else {
7859            Bytes::new(__input)
7860        };
7861        let mut __struct = Self::default();
7862        __struct.time_boot_ms = buf.get_u32_le();
7863        __struct.firmware_version = buf.get_u32_le();
7864        __struct.focal_length = buf.get_f32_le();
7865        __struct.sensor_size_h = buf.get_f32_le();
7866        __struct.sensor_size_v = buf.get_f32_le();
7867        let tmp = buf.get_u32_le();
7868        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7869            ::mavlink_core::error::ParserError::InvalidFlag {
7870                flag_type: "CameraCapFlags",
7871                value: tmp as u32,
7872            },
7873        )?;
7874        __struct.resolution_h = buf.get_u16_le();
7875        __struct.resolution_v = buf.get_u16_le();
7876        __struct.cam_definition_version = buf.get_u16_le();
7877        for v in &mut __struct.vendor_name {
7878            let val = buf.get_u8();
7879            *v = val;
7880        }
7881        for v in &mut __struct.model_name {
7882            let val = buf.get_u8();
7883            *v = val;
7884        }
7885        __struct.lens_id = buf.get_u8();
7886        for v in &mut __struct.cam_definition_uri {
7887            let val = buf.get_u8();
7888            *v = val;
7889        }
7890        __struct.gimbal_device_id = buf.get_u8();
7891        __struct.camera_device_id = buf.get_u8();
7892        Ok(__struct)
7893    }
7894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7895        let mut __tmp = BytesMut::new(bytes);
7896        #[allow(clippy::absurd_extreme_comparisons)]
7897        #[allow(unused_comparisons)]
7898        if __tmp.remaining() < Self::ENCODED_LEN {
7899            panic!(
7900                "buffer is too small (need {} bytes, but got {})",
7901                Self::ENCODED_LEN,
7902                __tmp.remaining(),
7903            )
7904        }
7905        __tmp.put_u32_le(self.time_boot_ms);
7906        __tmp.put_u32_le(self.firmware_version);
7907        __tmp.put_f32_le(self.focal_length);
7908        __tmp.put_f32_le(self.sensor_size_h);
7909        __tmp.put_f32_le(self.sensor_size_v);
7910        __tmp.put_u32_le(self.flags.bits());
7911        __tmp.put_u16_le(self.resolution_h);
7912        __tmp.put_u16_le(self.resolution_v);
7913        __tmp.put_u16_le(self.cam_definition_version);
7914        for val in &self.vendor_name {
7915            __tmp.put_u8(*val);
7916        }
7917        for val in &self.model_name {
7918            __tmp.put_u8(*val);
7919        }
7920        __tmp.put_u8(self.lens_id);
7921        for val in &self.cam_definition_uri {
7922            __tmp.put_u8(*val);
7923        }
7924        if matches!(version, MavlinkVersion::V2) {
7925            __tmp.put_u8(self.gimbal_device_id);
7926            __tmp.put_u8(self.camera_device_id);
7927            let len = __tmp.len();
7928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7929        } else {
7930            __tmp.len()
7931        }
7932    }
7933}
7934#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7935#[doc = ""]
7936#[doc = "ID: 260"]
7937#[derive(Debug, Clone, PartialEq)]
7938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7940#[cfg_attr(feature = "ts", derive(TS))]
7941#[cfg_attr(feature = "ts", ts(export))]
7942pub struct CAMERA_SETTINGS_DATA {
7943    #[doc = "Timestamp (time since system boot)."]
7944    pub time_boot_ms: u32,
7945    #[doc = "Camera mode"]
7946    pub mode_id: CameraMode,
7947    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7949    pub zoomLevel: f32,
7950    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7952    pub focusLevel: f32,
7953    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7955    pub camera_device_id: u8,
7956}
7957impl CAMERA_SETTINGS_DATA {
7958    pub const ENCODED_LEN: usize = 14usize;
7959    pub const DEFAULT: Self = Self {
7960        time_boot_ms: 0_u32,
7961        mode_id: CameraMode::DEFAULT,
7962        zoomLevel: 0.0_f32,
7963        focusLevel: 0.0_f32,
7964        camera_device_id: 0_u8,
7965    };
7966    #[cfg(feature = "arbitrary")]
7967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7968        use arbitrary::{Arbitrary, Unstructured};
7969        let mut buf = [0u8; 1024];
7970        rng.fill_bytes(&mut buf);
7971        let mut unstructured = Unstructured::new(&buf);
7972        Self::arbitrary(&mut unstructured).unwrap_or_default()
7973    }
7974}
7975impl Default for CAMERA_SETTINGS_DATA {
7976    fn default() -> Self {
7977        Self::DEFAULT.clone()
7978    }
7979}
7980impl MessageData for CAMERA_SETTINGS_DATA {
7981    type Message = MavMessage;
7982    const ID: u32 = 260u32;
7983    const NAME: &'static str = "CAMERA_SETTINGS";
7984    const EXTRA_CRC: u8 = 146u8;
7985    const ENCODED_LEN: usize = 14usize;
7986    fn deser(
7987        _version: MavlinkVersion,
7988        __input: &[u8],
7989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7990        let avail_len = __input.len();
7991        let mut payload_buf = [0; Self::ENCODED_LEN];
7992        let mut buf = if avail_len < Self::ENCODED_LEN {
7993            payload_buf[0..avail_len].copy_from_slice(__input);
7994            Bytes::new(&payload_buf)
7995        } else {
7996            Bytes::new(__input)
7997        };
7998        let mut __struct = Self::default();
7999        __struct.time_boot_ms = buf.get_u32_le();
8000        let tmp = buf.get_u8();
8001        __struct.mode_id =
8002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8003                enum_type: "CameraMode",
8004                value: tmp as u32,
8005            })?;
8006        __struct.zoomLevel = buf.get_f32_le();
8007        __struct.focusLevel = buf.get_f32_le();
8008        __struct.camera_device_id = buf.get_u8();
8009        Ok(__struct)
8010    }
8011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8012        let mut __tmp = BytesMut::new(bytes);
8013        #[allow(clippy::absurd_extreme_comparisons)]
8014        #[allow(unused_comparisons)]
8015        if __tmp.remaining() < Self::ENCODED_LEN {
8016            panic!(
8017                "buffer is too small (need {} bytes, but got {})",
8018                Self::ENCODED_LEN,
8019                __tmp.remaining(),
8020            )
8021        }
8022        __tmp.put_u32_le(self.time_boot_ms);
8023        __tmp.put_u8(self.mode_id as u8);
8024        if matches!(version, MavlinkVersion::V2) {
8025            __tmp.put_f32_le(self.zoomLevel);
8026            __tmp.put_f32_le(self.focusLevel);
8027            __tmp.put_u8(self.camera_device_id);
8028            let len = __tmp.len();
8029            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8030        } else {
8031            __tmp.len()
8032        }
8033    }
8034}
8035#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8036#[doc = ""]
8037#[doc = "ID: 277"]
8038#[derive(Debug, Clone, PartialEq)]
8039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8041#[cfg_attr(feature = "ts", derive(TS))]
8042#[cfg_attr(feature = "ts", ts(export))]
8043pub struct CAMERA_THERMAL_RANGE_DATA {
8044    #[doc = "Timestamp (time since system boot)."]
8045    pub time_boot_ms: u32,
8046    #[doc = "Temperature max."]
8047    pub max: f32,
8048    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8049    pub max_point_x: f32,
8050    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8051    pub max_point_y: f32,
8052    #[doc = "Temperature min."]
8053    pub min: f32,
8054    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8055    pub min_point_x: f32,
8056    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8057    pub min_point_y: f32,
8058    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8059    pub stream_id: u8,
8060    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8061    pub camera_device_id: u8,
8062}
8063impl CAMERA_THERMAL_RANGE_DATA {
8064    pub const ENCODED_LEN: usize = 30usize;
8065    pub const DEFAULT: Self = Self {
8066        time_boot_ms: 0_u32,
8067        max: 0.0_f32,
8068        max_point_x: 0.0_f32,
8069        max_point_y: 0.0_f32,
8070        min: 0.0_f32,
8071        min_point_x: 0.0_f32,
8072        min_point_y: 0.0_f32,
8073        stream_id: 0_u8,
8074        camera_device_id: 0_u8,
8075    };
8076    #[cfg(feature = "arbitrary")]
8077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8078        use arbitrary::{Arbitrary, Unstructured};
8079        let mut buf = [0u8; 1024];
8080        rng.fill_bytes(&mut buf);
8081        let mut unstructured = Unstructured::new(&buf);
8082        Self::arbitrary(&mut unstructured).unwrap_or_default()
8083    }
8084}
8085impl Default for CAMERA_THERMAL_RANGE_DATA {
8086    fn default() -> Self {
8087        Self::DEFAULT.clone()
8088    }
8089}
8090impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8091    type Message = MavMessage;
8092    const ID: u32 = 277u32;
8093    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8094    const EXTRA_CRC: u8 = 62u8;
8095    const ENCODED_LEN: usize = 30usize;
8096    fn deser(
8097        _version: MavlinkVersion,
8098        __input: &[u8],
8099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8100        let avail_len = __input.len();
8101        let mut payload_buf = [0; Self::ENCODED_LEN];
8102        let mut buf = if avail_len < Self::ENCODED_LEN {
8103            payload_buf[0..avail_len].copy_from_slice(__input);
8104            Bytes::new(&payload_buf)
8105        } else {
8106            Bytes::new(__input)
8107        };
8108        let mut __struct = Self::default();
8109        __struct.time_boot_ms = buf.get_u32_le();
8110        __struct.max = buf.get_f32_le();
8111        __struct.max_point_x = buf.get_f32_le();
8112        __struct.max_point_y = buf.get_f32_le();
8113        __struct.min = buf.get_f32_le();
8114        __struct.min_point_x = buf.get_f32_le();
8115        __struct.min_point_y = buf.get_f32_le();
8116        __struct.stream_id = buf.get_u8();
8117        __struct.camera_device_id = buf.get_u8();
8118        Ok(__struct)
8119    }
8120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8121        let mut __tmp = BytesMut::new(bytes);
8122        #[allow(clippy::absurd_extreme_comparisons)]
8123        #[allow(unused_comparisons)]
8124        if __tmp.remaining() < Self::ENCODED_LEN {
8125            panic!(
8126                "buffer is too small (need {} bytes, but got {})",
8127                Self::ENCODED_LEN,
8128                __tmp.remaining(),
8129            )
8130        }
8131        __tmp.put_u32_le(self.time_boot_ms);
8132        __tmp.put_f32_le(self.max);
8133        __tmp.put_f32_le(self.max_point_x);
8134        __tmp.put_f32_le(self.max_point_y);
8135        __tmp.put_f32_le(self.min);
8136        __tmp.put_f32_le(self.min_point_x);
8137        __tmp.put_f32_le(self.min_point_y);
8138        __tmp.put_u8(self.stream_id);
8139        __tmp.put_u8(self.camera_device_id);
8140        if matches!(version, MavlinkVersion::V2) {
8141            let len = __tmp.len();
8142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8143        } else {
8144            __tmp.len()
8145        }
8146    }
8147}
8148#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8149#[doc = ""]
8150#[doc = "ID: 276"]
8151#[derive(Debug, Clone, PartialEq)]
8152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8154#[cfg_attr(feature = "ts", derive(TS))]
8155#[cfg_attr(feature = "ts", ts(export))]
8156pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8157    #[doc = "Latitude of tracked object"]
8158    pub lat: i32,
8159    #[doc = "Longitude of tracked object"]
8160    pub lon: i32,
8161    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8162    pub alt: f32,
8163    #[doc = "Horizontal accuracy. NAN if unknown"]
8164    pub h_acc: f32,
8165    #[doc = "Vertical accuracy. NAN if unknown"]
8166    pub v_acc: f32,
8167    #[doc = "North velocity of tracked object. NAN if unknown"]
8168    pub vel_n: f32,
8169    #[doc = "East velocity of tracked object. NAN if unknown"]
8170    pub vel_e: f32,
8171    #[doc = "Down velocity of tracked object. NAN if unknown"]
8172    pub vel_d: f32,
8173    #[doc = "Velocity accuracy. NAN if unknown"]
8174    pub vel_acc: f32,
8175    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8176    pub dist: f32,
8177    #[doc = "Heading in radians, in NED. NAN if unknown"]
8178    pub hdg: f32,
8179    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8180    pub hdg_acc: f32,
8181    #[doc = "Current tracking status"]
8182    pub tracking_status: CameraTrackingStatusFlags,
8183    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8185    pub camera_device_id: u8,
8186}
8187impl CAMERA_TRACKING_GEO_STATUS_DATA {
8188    pub const ENCODED_LEN: usize = 50usize;
8189    pub const DEFAULT: Self = Self {
8190        lat: 0_i32,
8191        lon: 0_i32,
8192        alt: 0.0_f32,
8193        h_acc: 0.0_f32,
8194        v_acc: 0.0_f32,
8195        vel_n: 0.0_f32,
8196        vel_e: 0.0_f32,
8197        vel_d: 0.0_f32,
8198        vel_acc: 0.0_f32,
8199        dist: 0.0_f32,
8200        hdg: 0.0_f32,
8201        hdg_acc: 0.0_f32,
8202        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8203        camera_device_id: 0_u8,
8204    };
8205    #[cfg(feature = "arbitrary")]
8206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8207        use arbitrary::{Arbitrary, Unstructured};
8208        let mut buf = [0u8; 1024];
8209        rng.fill_bytes(&mut buf);
8210        let mut unstructured = Unstructured::new(&buf);
8211        Self::arbitrary(&mut unstructured).unwrap_or_default()
8212    }
8213}
8214impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8215    fn default() -> Self {
8216        Self::DEFAULT.clone()
8217    }
8218}
8219impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8220    type Message = MavMessage;
8221    const ID: u32 = 276u32;
8222    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8223    const EXTRA_CRC: u8 = 18u8;
8224    const ENCODED_LEN: usize = 50usize;
8225    fn deser(
8226        _version: MavlinkVersion,
8227        __input: &[u8],
8228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8229        let avail_len = __input.len();
8230        let mut payload_buf = [0; Self::ENCODED_LEN];
8231        let mut buf = if avail_len < Self::ENCODED_LEN {
8232            payload_buf[0..avail_len].copy_from_slice(__input);
8233            Bytes::new(&payload_buf)
8234        } else {
8235            Bytes::new(__input)
8236        };
8237        let mut __struct = Self::default();
8238        __struct.lat = buf.get_i32_le();
8239        __struct.lon = buf.get_i32_le();
8240        __struct.alt = buf.get_f32_le();
8241        __struct.h_acc = buf.get_f32_le();
8242        __struct.v_acc = buf.get_f32_le();
8243        __struct.vel_n = buf.get_f32_le();
8244        __struct.vel_e = buf.get_f32_le();
8245        __struct.vel_d = buf.get_f32_le();
8246        __struct.vel_acc = buf.get_f32_le();
8247        __struct.dist = buf.get_f32_le();
8248        __struct.hdg = buf.get_f32_le();
8249        __struct.hdg_acc = buf.get_f32_le();
8250        let tmp = buf.get_u8();
8251        __struct.tracking_status =
8252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8253                enum_type: "CameraTrackingStatusFlags",
8254                value: tmp as u32,
8255            })?;
8256        __struct.camera_device_id = buf.get_u8();
8257        Ok(__struct)
8258    }
8259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8260        let mut __tmp = BytesMut::new(bytes);
8261        #[allow(clippy::absurd_extreme_comparisons)]
8262        #[allow(unused_comparisons)]
8263        if __tmp.remaining() < Self::ENCODED_LEN {
8264            panic!(
8265                "buffer is too small (need {} bytes, but got {})",
8266                Self::ENCODED_LEN,
8267                __tmp.remaining(),
8268            )
8269        }
8270        __tmp.put_i32_le(self.lat);
8271        __tmp.put_i32_le(self.lon);
8272        __tmp.put_f32_le(self.alt);
8273        __tmp.put_f32_le(self.h_acc);
8274        __tmp.put_f32_le(self.v_acc);
8275        __tmp.put_f32_le(self.vel_n);
8276        __tmp.put_f32_le(self.vel_e);
8277        __tmp.put_f32_le(self.vel_d);
8278        __tmp.put_f32_le(self.vel_acc);
8279        __tmp.put_f32_le(self.dist);
8280        __tmp.put_f32_le(self.hdg);
8281        __tmp.put_f32_le(self.hdg_acc);
8282        __tmp.put_u8(self.tracking_status as u8);
8283        if matches!(version, MavlinkVersion::V2) {
8284            __tmp.put_u8(self.camera_device_id);
8285            let len = __tmp.len();
8286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8287        } else {
8288            __tmp.len()
8289        }
8290    }
8291}
8292#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8293#[doc = ""]
8294#[doc = "ID: 275"]
8295#[derive(Debug, Clone, PartialEq)]
8296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8298#[cfg_attr(feature = "ts", derive(TS))]
8299#[cfg_attr(feature = "ts", ts(export))]
8300pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8301    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8302    pub point_x: f32,
8303    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8304    pub point_y: f32,
8305    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8306    pub radius: f32,
8307    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8308    pub rec_top_x: f32,
8309    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8310    pub rec_top_y: f32,
8311    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8312    pub rec_bottom_x: f32,
8313    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8314    pub rec_bottom_y: f32,
8315    #[doc = "Current tracking status"]
8316    pub tracking_status: CameraTrackingStatusFlags,
8317    #[doc = "Current tracking mode"]
8318    pub tracking_mode: CameraTrackingMode,
8319    #[doc = "Defines location of target data"]
8320    pub target_data: CameraTrackingTargetData,
8321    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8322    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8323    pub camera_device_id: u8,
8324}
8325impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8326    pub const ENCODED_LEN: usize = 32usize;
8327    pub const DEFAULT: Self = Self {
8328        point_x: 0.0_f32,
8329        point_y: 0.0_f32,
8330        radius: 0.0_f32,
8331        rec_top_x: 0.0_f32,
8332        rec_top_y: 0.0_f32,
8333        rec_bottom_x: 0.0_f32,
8334        rec_bottom_y: 0.0_f32,
8335        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8336        tracking_mode: CameraTrackingMode::DEFAULT,
8337        target_data: CameraTrackingTargetData::DEFAULT,
8338        camera_device_id: 0_u8,
8339    };
8340    #[cfg(feature = "arbitrary")]
8341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8342        use arbitrary::{Arbitrary, Unstructured};
8343        let mut buf = [0u8; 1024];
8344        rng.fill_bytes(&mut buf);
8345        let mut unstructured = Unstructured::new(&buf);
8346        Self::arbitrary(&mut unstructured).unwrap_or_default()
8347    }
8348}
8349impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8350    fn default() -> Self {
8351        Self::DEFAULT.clone()
8352    }
8353}
8354impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8355    type Message = MavMessage;
8356    const ID: u32 = 275u32;
8357    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8358    const EXTRA_CRC: u8 = 126u8;
8359    const ENCODED_LEN: usize = 32usize;
8360    fn deser(
8361        _version: MavlinkVersion,
8362        __input: &[u8],
8363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8364        let avail_len = __input.len();
8365        let mut payload_buf = [0; Self::ENCODED_LEN];
8366        let mut buf = if avail_len < Self::ENCODED_LEN {
8367            payload_buf[0..avail_len].copy_from_slice(__input);
8368            Bytes::new(&payload_buf)
8369        } else {
8370            Bytes::new(__input)
8371        };
8372        let mut __struct = Self::default();
8373        __struct.point_x = buf.get_f32_le();
8374        __struct.point_y = buf.get_f32_le();
8375        __struct.radius = buf.get_f32_le();
8376        __struct.rec_top_x = buf.get_f32_le();
8377        __struct.rec_top_y = buf.get_f32_le();
8378        __struct.rec_bottom_x = buf.get_f32_le();
8379        __struct.rec_bottom_y = buf.get_f32_le();
8380        let tmp = buf.get_u8();
8381        __struct.tracking_status =
8382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8383                enum_type: "CameraTrackingStatusFlags",
8384                value: tmp as u32,
8385            })?;
8386        let tmp = buf.get_u8();
8387        __struct.tracking_mode =
8388            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8389                enum_type: "CameraTrackingMode",
8390                value: tmp as u32,
8391            })?;
8392        let tmp = buf.get_u8();
8393        __struct.target_data =
8394            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8395                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8396                    flag_type: "CameraTrackingTargetData",
8397                    value: tmp as u32,
8398                })?;
8399        __struct.camera_device_id = buf.get_u8();
8400        Ok(__struct)
8401    }
8402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8403        let mut __tmp = BytesMut::new(bytes);
8404        #[allow(clippy::absurd_extreme_comparisons)]
8405        #[allow(unused_comparisons)]
8406        if __tmp.remaining() < Self::ENCODED_LEN {
8407            panic!(
8408                "buffer is too small (need {} bytes, but got {})",
8409                Self::ENCODED_LEN,
8410                __tmp.remaining(),
8411            )
8412        }
8413        __tmp.put_f32_le(self.point_x);
8414        __tmp.put_f32_le(self.point_y);
8415        __tmp.put_f32_le(self.radius);
8416        __tmp.put_f32_le(self.rec_top_x);
8417        __tmp.put_f32_le(self.rec_top_y);
8418        __tmp.put_f32_le(self.rec_bottom_x);
8419        __tmp.put_f32_le(self.rec_bottom_y);
8420        __tmp.put_u8(self.tracking_status as u8);
8421        __tmp.put_u8(self.tracking_mode as u8);
8422        __tmp.put_u8(self.target_data.bits());
8423        if matches!(version, MavlinkVersion::V2) {
8424            __tmp.put_u8(self.camera_device_id);
8425            let len = __tmp.len();
8426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8427        } else {
8428            __tmp.len()
8429        }
8430    }
8431}
8432#[doc = "Camera-IMU triggering and synchronisation message."]
8433#[doc = ""]
8434#[doc = "ID: 112"]
8435#[derive(Debug, Clone, PartialEq)]
8436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8438#[cfg_attr(feature = "ts", derive(TS))]
8439#[cfg_attr(feature = "ts", ts(export))]
8440pub struct CAMERA_TRIGGER_DATA {
8441    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8442    pub time_usec: u64,
8443    #[doc = "Image frame sequence"]
8444    pub seq: u32,
8445}
8446impl CAMERA_TRIGGER_DATA {
8447    pub const ENCODED_LEN: usize = 12usize;
8448    pub const DEFAULT: Self = Self {
8449        time_usec: 0_u64,
8450        seq: 0_u32,
8451    };
8452    #[cfg(feature = "arbitrary")]
8453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8454        use arbitrary::{Arbitrary, Unstructured};
8455        let mut buf = [0u8; 1024];
8456        rng.fill_bytes(&mut buf);
8457        let mut unstructured = Unstructured::new(&buf);
8458        Self::arbitrary(&mut unstructured).unwrap_or_default()
8459    }
8460}
8461impl Default for CAMERA_TRIGGER_DATA {
8462    fn default() -> Self {
8463        Self::DEFAULT.clone()
8464    }
8465}
8466impl MessageData for CAMERA_TRIGGER_DATA {
8467    type Message = MavMessage;
8468    const ID: u32 = 112u32;
8469    const NAME: &'static str = "CAMERA_TRIGGER";
8470    const EXTRA_CRC: u8 = 174u8;
8471    const ENCODED_LEN: usize = 12usize;
8472    fn deser(
8473        _version: MavlinkVersion,
8474        __input: &[u8],
8475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8476        let avail_len = __input.len();
8477        let mut payload_buf = [0; Self::ENCODED_LEN];
8478        let mut buf = if avail_len < Self::ENCODED_LEN {
8479            payload_buf[0..avail_len].copy_from_slice(__input);
8480            Bytes::new(&payload_buf)
8481        } else {
8482            Bytes::new(__input)
8483        };
8484        let mut __struct = Self::default();
8485        __struct.time_usec = buf.get_u64_le();
8486        __struct.seq = buf.get_u32_le();
8487        Ok(__struct)
8488    }
8489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8490        let mut __tmp = BytesMut::new(bytes);
8491        #[allow(clippy::absurd_extreme_comparisons)]
8492        #[allow(unused_comparisons)]
8493        if __tmp.remaining() < Self::ENCODED_LEN {
8494            panic!(
8495                "buffer is too small (need {} bytes, but got {})",
8496                Self::ENCODED_LEN,
8497                __tmp.remaining(),
8498            )
8499        }
8500        __tmp.put_u64_le(self.time_usec);
8501        __tmp.put_u32_le(self.seq);
8502        if matches!(version, MavlinkVersion::V2) {
8503            let len = __tmp.len();
8504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8505        } else {
8506            __tmp.len()
8507        }
8508    }
8509}
8510#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8511#[doc = ""]
8512#[doc = "ID: 387"]
8513#[derive(Debug, Clone, PartialEq)]
8514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8516#[cfg_attr(feature = "ts", derive(TS))]
8517#[cfg_attr(feature = "ts", ts(export))]
8518pub struct CANFD_FRAME_DATA {
8519    #[doc = "Frame ID"]
8520    pub id: u32,
8521    #[doc = "System ID."]
8522    pub target_system: u8,
8523    #[doc = "Component ID."]
8524    pub target_component: u8,
8525    #[doc = "bus number"]
8526    pub bus: u8,
8527    #[doc = "Frame length"]
8528    pub len: u8,
8529    #[doc = "Frame data"]
8530    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8531    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8532    pub data: [u8; 64],
8533}
8534impl CANFD_FRAME_DATA {
8535    pub const ENCODED_LEN: usize = 72usize;
8536    pub const DEFAULT: Self = Self {
8537        id: 0_u32,
8538        target_system: 0_u8,
8539        target_component: 0_u8,
8540        bus: 0_u8,
8541        len: 0_u8,
8542        data: [0_u8; 64usize],
8543    };
8544    #[cfg(feature = "arbitrary")]
8545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8546        use arbitrary::{Arbitrary, Unstructured};
8547        let mut buf = [0u8; 1024];
8548        rng.fill_bytes(&mut buf);
8549        let mut unstructured = Unstructured::new(&buf);
8550        Self::arbitrary(&mut unstructured).unwrap_or_default()
8551    }
8552}
8553impl Default for CANFD_FRAME_DATA {
8554    fn default() -> Self {
8555        Self::DEFAULT.clone()
8556    }
8557}
8558impl MessageData for CANFD_FRAME_DATA {
8559    type Message = MavMessage;
8560    const ID: u32 = 387u32;
8561    const NAME: &'static str = "CANFD_FRAME";
8562    const EXTRA_CRC: u8 = 4u8;
8563    const ENCODED_LEN: usize = 72usize;
8564    fn deser(
8565        _version: MavlinkVersion,
8566        __input: &[u8],
8567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8568        let avail_len = __input.len();
8569        let mut payload_buf = [0; Self::ENCODED_LEN];
8570        let mut buf = if avail_len < Self::ENCODED_LEN {
8571            payload_buf[0..avail_len].copy_from_slice(__input);
8572            Bytes::new(&payload_buf)
8573        } else {
8574            Bytes::new(__input)
8575        };
8576        let mut __struct = Self::default();
8577        __struct.id = buf.get_u32_le();
8578        __struct.target_system = buf.get_u8();
8579        __struct.target_component = buf.get_u8();
8580        __struct.bus = buf.get_u8();
8581        __struct.len = buf.get_u8();
8582        for v in &mut __struct.data {
8583            let val = buf.get_u8();
8584            *v = val;
8585        }
8586        Ok(__struct)
8587    }
8588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8589        let mut __tmp = BytesMut::new(bytes);
8590        #[allow(clippy::absurd_extreme_comparisons)]
8591        #[allow(unused_comparisons)]
8592        if __tmp.remaining() < Self::ENCODED_LEN {
8593            panic!(
8594                "buffer is too small (need {} bytes, but got {})",
8595                Self::ENCODED_LEN,
8596                __tmp.remaining(),
8597            )
8598        }
8599        __tmp.put_u32_le(self.id);
8600        __tmp.put_u8(self.target_system);
8601        __tmp.put_u8(self.target_component);
8602        __tmp.put_u8(self.bus);
8603        __tmp.put_u8(self.len);
8604        for val in &self.data {
8605            __tmp.put_u8(*val);
8606        }
8607        if matches!(version, MavlinkVersion::V2) {
8608            let len = __tmp.len();
8609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8610        } else {
8611            __tmp.len()
8612        }
8613    }
8614}
8615#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8616#[doc = ""]
8617#[doc = "ID: 388"]
8618#[derive(Debug, Clone, PartialEq)]
8619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8621#[cfg_attr(feature = "ts", derive(TS))]
8622#[cfg_attr(feature = "ts", ts(export))]
8623pub struct CAN_FILTER_MODIFY_DATA {
8624    #[doc = "filter IDs, length num_ids"]
8625    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8626    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8627    pub ids: [u16; 16],
8628    #[doc = "System ID."]
8629    pub target_system: u8,
8630    #[doc = "Component ID."]
8631    pub target_component: u8,
8632    #[doc = "bus number"]
8633    pub bus: u8,
8634    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8635    pub operation: CanFilterOp,
8636    #[doc = "number of IDs in filter list"]
8637    pub num_ids: u8,
8638}
8639impl CAN_FILTER_MODIFY_DATA {
8640    pub const ENCODED_LEN: usize = 37usize;
8641    pub const DEFAULT: Self = Self {
8642        ids: [0_u16; 16usize],
8643        target_system: 0_u8,
8644        target_component: 0_u8,
8645        bus: 0_u8,
8646        operation: CanFilterOp::DEFAULT,
8647        num_ids: 0_u8,
8648    };
8649    #[cfg(feature = "arbitrary")]
8650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8651        use arbitrary::{Arbitrary, Unstructured};
8652        let mut buf = [0u8; 1024];
8653        rng.fill_bytes(&mut buf);
8654        let mut unstructured = Unstructured::new(&buf);
8655        Self::arbitrary(&mut unstructured).unwrap_or_default()
8656    }
8657}
8658impl Default for CAN_FILTER_MODIFY_DATA {
8659    fn default() -> Self {
8660        Self::DEFAULT.clone()
8661    }
8662}
8663impl MessageData for CAN_FILTER_MODIFY_DATA {
8664    type Message = MavMessage;
8665    const ID: u32 = 388u32;
8666    const NAME: &'static str = "CAN_FILTER_MODIFY";
8667    const EXTRA_CRC: u8 = 8u8;
8668    const ENCODED_LEN: usize = 37usize;
8669    fn deser(
8670        _version: MavlinkVersion,
8671        __input: &[u8],
8672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8673        let avail_len = __input.len();
8674        let mut payload_buf = [0; Self::ENCODED_LEN];
8675        let mut buf = if avail_len < Self::ENCODED_LEN {
8676            payload_buf[0..avail_len].copy_from_slice(__input);
8677            Bytes::new(&payload_buf)
8678        } else {
8679            Bytes::new(__input)
8680        };
8681        let mut __struct = Self::default();
8682        for v in &mut __struct.ids {
8683            let val = buf.get_u16_le();
8684            *v = val;
8685        }
8686        __struct.target_system = buf.get_u8();
8687        __struct.target_component = buf.get_u8();
8688        __struct.bus = buf.get_u8();
8689        let tmp = buf.get_u8();
8690        __struct.operation =
8691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8692                enum_type: "CanFilterOp",
8693                value: tmp as u32,
8694            })?;
8695        __struct.num_ids = buf.get_u8();
8696        Ok(__struct)
8697    }
8698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8699        let mut __tmp = BytesMut::new(bytes);
8700        #[allow(clippy::absurd_extreme_comparisons)]
8701        #[allow(unused_comparisons)]
8702        if __tmp.remaining() < Self::ENCODED_LEN {
8703            panic!(
8704                "buffer is too small (need {} bytes, but got {})",
8705                Self::ENCODED_LEN,
8706                __tmp.remaining(),
8707            )
8708        }
8709        for val in &self.ids {
8710            __tmp.put_u16_le(*val);
8711        }
8712        __tmp.put_u8(self.target_system);
8713        __tmp.put_u8(self.target_component);
8714        __tmp.put_u8(self.bus);
8715        __tmp.put_u8(self.operation as u8);
8716        __tmp.put_u8(self.num_ids);
8717        if matches!(version, MavlinkVersion::V2) {
8718            let len = __tmp.len();
8719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8720        } else {
8721            __tmp.len()
8722        }
8723    }
8724}
8725#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8726#[doc = ""]
8727#[doc = "ID: 386"]
8728#[derive(Debug, Clone, PartialEq)]
8729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8731#[cfg_attr(feature = "ts", derive(TS))]
8732#[cfg_attr(feature = "ts", ts(export))]
8733pub struct CAN_FRAME_DATA {
8734    #[doc = "Frame ID"]
8735    pub id: u32,
8736    #[doc = "System ID."]
8737    pub target_system: u8,
8738    #[doc = "Component ID."]
8739    pub target_component: u8,
8740    #[doc = "Bus number"]
8741    pub bus: u8,
8742    #[doc = "Frame length"]
8743    pub len: u8,
8744    #[doc = "Frame data"]
8745    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8746    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8747    pub data: [u8; 8],
8748}
8749impl CAN_FRAME_DATA {
8750    pub const ENCODED_LEN: usize = 16usize;
8751    pub const DEFAULT: Self = Self {
8752        id: 0_u32,
8753        target_system: 0_u8,
8754        target_component: 0_u8,
8755        bus: 0_u8,
8756        len: 0_u8,
8757        data: [0_u8; 8usize],
8758    };
8759    #[cfg(feature = "arbitrary")]
8760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8761        use arbitrary::{Arbitrary, Unstructured};
8762        let mut buf = [0u8; 1024];
8763        rng.fill_bytes(&mut buf);
8764        let mut unstructured = Unstructured::new(&buf);
8765        Self::arbitrary(&mut unstructured).unwrap_or_default()
8766    }
8767}
8768impl Default for CAN_FRAME_DATA {
8769    fn default() -> Self {
8770        Self::DEFAULT.clone()
8771    }
8772}
8773impl MessageData for CAN_FRAME_DATA {
8774    type Message = MavMessage;
8775    const ID: u32 = 386u32;
8776    const NAME: &'static str = "CAN_FRAME";
8777    const EXTRA_CRC: u8 = 132u8;
8778    const ENCODED_LEN: usize = 16usize;
8779    fn deser(
8780        _version: MavlinkVersion,
8781        __input: &[u8],
8782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8783        let avail_len = __input.len();
8784        let mut payload_buf = [0; Self::ENCODED_LEN];
8785        let mut buf = if avail_len < Self::ENCODED_LEN {
8786            payload_buf[0..avail_len].copy_from_slice(__input);
8787            Bytes::new(&payload_buf)
8788        } else {
8789            Bytes::new(__input)
8790        };
8791        let mut __struct = Self::default();
8792        __struct.id = buf.get_u32_le();
8793        __struct.target_system = buf.get_u8();
8794        __struct.target_component = buf.get_u8();
8795        __struct.bus = buf.get_u8();
8796        __struct.len = buf.get_u8();
8797        for v in &mut __struct.data {
8798            let val = buf.get_u8();
8799            *v = val;
8800        }
8801        Ok(__struct)
8802    }
8803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8804        let mut __tmp = BytesMut::new(bytes);
8805        #[allow(clippy::absurd_extreme_comparisons)]
8806        #[allow(unused_comparisons)]
8807        if __tmp.remaining() < Self::ENCODED_LEN {
8808            panic!(
8809                "buffer is too small (need {} bytes, but got {})",
8810                Self::ENCODED_LEN,
8811                __tmp.remaining(),
8812            )
8813        }
8814        __tmp.put_u32_le(self.id);
8815        __tmp.put_u8(self.target_system);
8816        __tmp.put_u8(self.target_component);
8817        __tmp.put_u8(self.bus);
8818        __tmp.put_u8(self.len);
8819        for val in &self.data {
8820            __tmp.put_u8(*val);
8821        }
8822        if matches!(version, MavlinkVersion::V2) {
8823            let len = __tmp.len();
8824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8825        } else {
8826            __tmp.len()
8827        }
8828    }
8829}
8830#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8831#[doc = ""]
8832#[doc = "ID: 336"]
8833#[derive(Debug, Clone, PartialEq)]
8834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8836#[cfg_attr(feature = "ts", derive(TS))]
8837#[cfg_attr(feature = "ts", ts(export))]
8838pub struct CELLULAR_CONFIG_DATA {
8839    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8840    pub enable_lte: u8,
8841    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8842    pub enable_pin: u8,
8843    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8844    #[cfg_attr(
8845        feature = "serde",
8846        serde(
8847            serialize_with = "crate::nulstr::serialize::<_, 16>",
8848            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8849        )
8850    )]
8851    #[cfg_attr(feature = "ts", ts(type = "string"))]
8852    pub pin: [u8; 16],
8853    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8854    #[cfg_attr(
8855        feature = "serde",
8856        serde(
8857            serialize_with = "crate::nulstr::serialize::<_, 16>",
8858            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8859        )
8860    )]
8861    #[cfg_attr(feature = "ts", ts(type = "string"))]
8862    pub new_pin: [u8; 16],
8863    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8864    #[cfg_attr(
8865        feature = "serde",
8866        serde(
8867            serialize_with = "crate::nulstr::serialize::<_, 32>",
8868            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
8869        )
8870    )]
8871    #[cfg_attr(feature = "ts", ts(type = "string"))]
8872    pub apn: [u8; 32],
8873    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8874    #[cfg_attr(
8875        feature = "serde",
8876        serde(
8877            serialize_with = "crate::nulstr::serialize::<_, 16>",
8878            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
8879        )
8880    )]
8881    #[cfg_attr(feature = "ts", ts(type = "string"))]
8882    pub puk: [u8; 16],
8883    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8884    pub roaming: u8,
8885    #[doc = "Message acceptance response (sent back to GS)."]
8886    pub response: CellularConfigResponse,
8887}
8888impl CELLULAR_CONFIG_DATA {
8889    pub const ENCODED_LEN: usize = 84usize;
8890    pub const DEFAULT: Self = Self {
8891        enable_lte: 0_u8,
8892        enable_pin: 0_u8,
8893        pin: [0_u8; 16usize],
8894        new_pin: [0_u8; 16usize],
8895        apn: [0_u8; 32usize],
8896        puk: [0_u8; 16usize],
8897        roaming: 0_u8,
8898        response: CellularConfigResponse::DEFAULT,
8899    };
8900    #[cfg(feature = "arbitrary")]
8901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8902        use arbitrary::{Arbitrary, Unstructured};
8903        let mut buf = [0u8; 1024];
8904        rng.fill_bytes(&mut buf);
8905        let mut unstructured = Unstructured::new(&buf);
8906        Self::arbitrary(&mut unstructured).unwrap_or_default()
8907    }
8908}
8909impl Default for CELLULAR_CONFIG_DATA {
8910    fn default() -> Self {
8911        Self::DEFAULT.clone()
8912    }
8913}
8914impl MessageData for CELLULAR_CONFIG_DATA {
8915    type Message = MavMessage;
8916    const ID: u32 = 336u32;
8917    const NAME: &'static str = "CELLULAR_CONFIG";
8918    const EXTRA_CRC: u8 = 245u8;
8919    const ENCODED_LEN: usize = 84usize;
8920    fn deser(
8921        _version: MavlinkVersion,
8922        __input: &[u8],
8923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8924        let avail_len = __input.len();
8925        let mut payload_buf = [0; Self::ENCODED_LEN];
8926        let mut buf = if avail_len < Self::ENCODED_LEN {
8927            payload_buf[0..avail_len].copy_from_slice(__input);
8928            Bytes::new(&payload_buf)
8929        } else {
8930            Bytes::new(__input)
8931        };
8932        let mut __struct = Self::default();
8933        __struct.enable_lte = buf.get_u8();
8934        __struct.enable_pin = buf.get_u8();
8935        for v in &mut __struct.pin {
8936            let val = buf.get_u8();
8937            *v = val;
8938        }
8939        for v in &mut __struct.new_pin {
8940            let val = buf.get_u8();
8941            *v = val;
8942        }
8943        for v in &mut __struct.apn {
8944            let val = buf.get_u8();
8945            *v = val;
8946        }
8947        for v in &mut __struct.puk {
8948            let val = buf.get_u8();
8949            *v = val;
8950        }
8951        __struct.roaming = buf.get_u8();
8952        let tmp = buf.get_u8();
8953        __struct.response =
8954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8955                enum_type: "CellularConfigResponse",
8956                value: tmp as u32,
8957            })?;
8958        Ok(__struct)
8959    }
8960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8961        let mut __tmp = BytesMut::new(bytes);
8962        #[allow(clippy::absurd_extreme_comparisons)]
8963        #[allow(unused_comparisons)]
8964        if __tmp.remaining() < Self::ENCODED_LEN {
8965            panic!(
8966                "buffer is too small (need {} bytes, but got {})",
8967                Self::ENCODED_LEN,
8968                __tmp.remaining(),
8969            )
8970        }
8971        __tmp.put_u8(self.enable_lte);
8972        __tmp.put_u8(self.enable_pin);
8973        for val in &self.pin {
8974            __tmp.put_u8(*val);
8975        }
8976        for val in &self.new_pin {
8977            __tmp.put_u8(*val);
8978        }
8979        for val in &self.apn {
8980            __tmp.put_u8(*val);
8981        }
8982        for val in &self.puk {
8983            __tmp.put_u8(*val);
8984        }
8985        __tmp.put_u8(self.roaming);
8986        __tmp.put_u8(self.response as u8);
8987        if matches!(version, MavlinkVersion::V2) {
8988            let len = __tmp.len();
8989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8990        } else {
8991            __tmp.len()
8992        }
8993    }
8994}
8995#[doc = "Report current used cellular network status."]
8996#[doc = ""]
8997#[doc = "ID: 334"]
8998#[derive(Debug, Clone, PartialEq)]
8999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9001#[cfg_attr(feature = "ts", derive(TS))]
9002#[cfg_attr(feature = "ts", ts(export))]
9003pub struct CELLULAR_STATUS_DATA {
9004    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9005    pub mcc: u16,
9006    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9007    pub mnc: u16,
9008    #[doc = "Location area code. If unknown, set to 0"]
9009    pub lac: u16,
9010    #[doc = "Cellular modem status"]
9011    pub status: CellularStatusFlag,
9012    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9013    pub failure_reason: CellularNetworkFailedReason,
9014    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9015    pub mavtype: CellularNetworkRadioType,
9016    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9017    pub quality: u8,
9018}
9019impl CELLULAR_STATUS_DATA {
9020    pub const ENCODED_LEN: usize = 10usize;
9021    pub const DEFAULT: Self = Self {
9022        mcc: 0_u16,
9023        mnc: 0_u16,
9024        lac: 0_u16,
9025        status: CellularStatusFlag::DEFAULT,
9026        failure_reason: CellularNetworkFailedReason::DEFAULT,
9027        mavtype: CellularNetworkRadioType::DEFAULT,
9028        quality: 0_u8,
9029    };
9030    #[cfg(feature = "arbitrary")]
9031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9032        use arbitrary::{Arbitrary, Unstructured};
9033        let mut buf = [0u8; 1024];
9034        rng.fill_bytes(&mut buf);
9035        let mut unstructured = Unstructured::new(&buf);
9036        Self::arbitrary(&mut unstructured).unwrap_or_default()
9037    }
9038}
9039impl Default for CELLULAR_STATUS_DATA {
9040    fn default() -> Self {
9041        Self::DEFAULT.clone()
9042    }
9043}
9044impl MessageData for CELLULAR_STATUS_DATA {
9045    type Message = MavMessage;
9046    const ID: u32 = 334u32;
9047    const NAME: &'static str = "CELLULAR_STATUS";
9048    const EXTRA_CRC: u8 = 72u8;
9049    const ENCODED_LEN: usize = 10usize;
9050    fn deser(
9051        _version: MavlinkVersion,
9052        __input: &[u8],
9053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9054        let avail_len = __input.len();
9055        let mut payload_buf = [0; Self::ENCODED_LEN];
9056        let mut buf = if avail_len < Self::ENCODED_LEN {
9057            payload_buf[0..avail_len].copy_from_slice(__input);
9058            Bytes::new(&payload_buf)
9059        } else {
9060            Bytes::new(__input)
9061        };
9062        let mut __struct = Self::default();
9063        __struct.mcc = buf.get_u16_le();
9064        __struct.mnc = buf.get_u16_le();
9065        __struct.lac = buf.get_u16_le();
9066        let tmp = buf.get_u8();
9067        __struct.status =
9068            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9069                enum_type: "CellularStatusFlag",
9070                value: tmp as u32,
9071            })?;
9072        let tmp = buf.get_u8();
9073        __struct.failure_reason =
9074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9075                enum_type: "CellularNetworkFailedReason",
9076                value: tmp as u32,
9077            })?;
9078        let tmp = buf.get_u8();
9079        __struct.mavtype =
9080            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9081                enum_type: "CellularNetworkRadioType",
9082                value: tmp as u32,
9083            })?;
9084        __struct.quality = buf.get_u8();
9085        Ok(__struct)
9086    }
9087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9088        let mut __tmp = BytesMut::new(bytes);
9089        #[allow(clippy::absurd_extreme_comparisons)]
9090        #[allow(unused_comparisons)]
9091        if __tmp.remaining() < Self::ENCODED_LEN {
9092            panic!(
9093                "buffer is too small (need {} bytes, but got {})",
9094                Self::ENCODED_LEN,
9095                __tmp.remaining(),
9096            )
9097        }
9098        __tmp.put_u16_le(self.mcc);
9099        __tmp.put_u16_le(self.mnc);
9100        __tmp.put_u16_le(self.lac);
9101        __tmp.put_u8(self.status as u8);
9102        __tmp.put_u8(self.failure_reason as u8);
9103        __tmp.put_u8(self.mavtype as u8);
9104        __tmp.put_u8(self.quality);
9105        if matches!(version, MavlinkVersion::V2) {
9106            let len = __tmp.len();
9107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9108        } else {
9109            __tmp.len()
9110        }
9111    }
9112}
9113#[doc = "Request to control this MAV."]
9114#[doc = ""]
9115#[doc = "ID: 5"]
9116#[derive(Debug, Clone, PartialEq)]
9117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9119#[cfg_attr(feature = "ts", derive(TS))]
9120#[cfg_attr(feature = "ts", ts(export))]
9121pub struct CHANGE_OPERATOR_CONTROL_DATA {
9122    #[doc = "System the GCS requests control for"]
9123    pub target_system: u8,
9124    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9125    pub control_request: u8,
9126    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9127    pub version: u8,
9128    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9129    #[cfg_attr(
9130        feature = "serde",
9131        serde(
9132            serialize_with = "crate::nulstr::serialize::<_, 25>",
9133            deserialize_with = "crate::nulstr::deserialize::<_, 25>"
9134        )
9135    )]
9136    #[cfg_attr(feature = "ts", ts(type = "string"))]
9137    pub passkey: [u8; 25],
9138}
9139impl CHANGE_OPERATOR_CONTROL_DATA {
9140    pub const ENCODED_LEN: usize = 28usize;
9141    pub const DEFAULT: Self = Self {
9142        target_system: 0_u8,
9143        control_request: 0_u8,
9144        version: 0_u8,
9145        passkey: [0_u8; 25usize],
9146    };
9147    #[cfg(feature = "arbitrary")]
9148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9149        use arbitrary::{Arbitrary, Unstructured};
9150        let mut buf = [0u8; 1024];
9151        rng.fill_bytes(&mut buf);
9152        let mut unstructured = Unstructured::new(&buf);
9153        Self::arbitrary(&mut unstructured).unwrap_or_default()
9154    }
9155}
9156impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9157    fn default() -> Self {
9158        Self::DEFAULT.clone()
9159    }
9160}
9161impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9162    type Message = MavMessage;
9163    const ID: u32 = 5u32;
9164    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9165    const EXTRA_CRC: u8 = 217u8;
9166    const ENCODED_LEN: usize = 28usize;
9167    fn deser(
9168        _version: MavlinkVersion,
9169        __input: &[u8],
9170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9171        let avail_len = __input.len();
9172        let mut payload_buf = [0; Self::ENCODED_LEN];
9173        let mut buf = if avail_len < Self::ENCODED_LEN {
9174            payload_buf[0..avail_len].copy_from_slice(__input);
9175            Bytes::new(&payload_buf)
9176        } else {
9177            Bytes::new(__input)
9178        };
9179        let mut __struct = Self::default();
9180        __struct.target_system = buf.get_u8();
9181        __struct.control_request = buf.get_u8();
9182        __struct.version = buf.get_u8();
9183        for v in &mut __struct.passkey {
9184            let val = buf.get_u8();
9185            *v = val;
9186        }
9187        Ok(__struct)
9188    }
9189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9190        let mut __tmp = BytesMut::new(bytes);
9191        #[allow(clippy::absurd_extreme_comparisons)]
9192        #[allow(unused_comparisons)]
9193        if __tmp.remaining() < Self::ENCODED_LEN {
9194            panic!(
9195                "buffer is too small (need {} bytes, but got {})",
9196                Self::ENCODED_LEN,
9197                __tmp.remaining(),
9198            )
9199        }
9200        __tmp.put_u8(self.target_system);
9201        __tmp.put_u8(self.control_request);
9202        __tmp.put_u8(self.version);
9203        for val in &self.passkey {
9204            __tmp.put_u8(*val);
9205        }
9206        if matches!(version, MavlinkVersion::V2) {
9207            let len = __tmp.len();
9208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9209        } else {
9210            __tmp.len()
9211        }
9212    }
9213}
9214#[doc = "Accept / deny control of this MAV."]
9215#[doc = ""]
9216#[doc = "ID: 6"]
9217#[derive(Debug, Clone, PartialEq)]
9218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9220#[cfg_attr(feature = "ts", derive(TS))]
9221#[cfg_attr(feature = "ts", ts(export))]
9222pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9223    #[doc = "ID of the GCS this message"]
9224    pub gcs_system_id: u8,
9225    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9226    pub control_request: u8,
9227    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9228    pub ack: u8,
9229}
9230impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9231    pub const ENCODED_LEN: usize = 3usize;
9232    pub const DEFAULT: Self = Self {
9233        gcs_system_id: 0_u8,
9234        control_request: 0_u8,
9235        ack: 0_u8,
9236    };
9237    #[cfg(feature = "arbitrary")]
9238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9239        use arbitrary::{Arbitrary, Unstructured};
9240        let mut buf = [0u8; 1024];
9241        rng.fill_bytes(&mut buf);
9242        let mut unstructured = Unstructured::new(&buf);
9243        Self::arbitrary(&mut unstructured).unwrap_or_default()
9244    }
9245}
9246impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9247    fn default() -> Self {
9248        Self::DEFAULT.clone()
9249    }
9250}
9251impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9252    type Message = MavMessage;
9253    const ID: u32 = 6u32;
9254    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9255    const EXTRA_CRC: u8 = 104u8;
9256    const ENCODED_LEN: usize = 3usize;
9257    fn deser(
9258        _version: MavlinkVersion,
9259        __input: &[u8],
9260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9261        let avail_len = __input.len();
9262        let mut payload_buf = [0; Self::ENCODED_LEN];
9263        let mut buf = if avail_len < Self::ENCODED_LEN {
9264            payload_buf[0..avail_len].copy_from_slice(__input);
9265            Bytes::new(&payload_buf)
9266        } else {
9267            Bytes::new(__input)
9268        };
9269        let mut __struct = Self::default();
9270        __struct.gcs_system_id = buf.get_u8();
9271        __struct.control_request = buf.get_u8();
9272        __struct.ack = buf.get_u8();
9273        Ok(__struct)
9274    }
9275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9276        let mut __tmp = BytesMut::new(bytes);
9277        #[allow(clippy::absurd_extreme_comparisons)]
9278        #[allow(unused_comparisons)]
9279        if __tmp.remaining() < Self::ENCODED_LEN {
9280            panic!(
9281                "buffer is too small (need {} bytes, but got {})",
9282                Self::ENCODED_LEN,
9283                __tmp.remaining(),
9284            )
9285        }
9286        __tmp.put_u8(self.gcs_system_id);
9287        __tmp.put_u8(self.control_request);
9288        __tmp.put_u8(self.ack);
9289        if matches!(version, MavlinkVersion::V2) {
9290            let len = __tmp.len();
9291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9292        } else {
9293            __tmp.len()
9294        }
9295    }
9296}
9297#[doc = "Information about a potential collision."]
9298#[doc = ""]
9299#[doc = "ID: 247"]
9300#[derive(Debug, Clone, PartialEq)]
9301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9303#[cfg_attr(feature = "ts", derive(TS))]
9304#[cfg_attr(feature = "ts", ts(export))]
9305pub struct COLLISION_DATA {
9306    #[doc = "Unique identifier, domain based on src field"]
9307    pub id: u32,
9308    #[doc = "Estimated time until collision occurs"]
9309    pub time_to_minimum_delta: f32,
9310    #[doc = "Closest vertical distance between vehicle and object"]
9311    pub altitude_minimum_delta: f32,
9312    #[doc = "Closest horizontal distance between vehicle and object"]
9313    pub horizontal_minimum_delta: f32,
9314    #[doc = "Collision data source"]
9315    pub src: MavCollisionSrc,
9316    #[doc = "Action that is being taken to avoid this collision"]
9317    pub action: MavCollisionAction,
9318    #[doc = "How concerned the aircraft is about this collision"]
9319    pub threat_level: MavCollisionThreatLevel,
9320}
9321impl COLLISION_DATA {
9322    pub const ENCODED_LEN: usize = 19usize;
9323    pub const DEFAULT: Self = Self {
9324        id: 0_u32,
9325        time_to_minimum_delta: 0.0_f32,
9326        altitude_minimum_delta: 0.0_f32,
9327        horizontal_minimum_delta: 0.0_f32,
9328        src: MavCollisionSrc::DEFAULT,
9329        action: MavCollisionAction::DEFAULT,
9330        threat_level: MavCollisionThreatLevel::DEFAULT,
9331    };
9332    #[cfg(feature = "arbitrary")]
9333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9334        use arbitrary::{Arbitrary, Unstructured};
9335        let mut buf = [0u8; 1024];
9336        rng.fill_bytes(&mut buf);
9337        let mut unstructured = Unstructured::new(&buf);
9338        Self::arbitrary(&mut unstructured).unwrap_or_default()
9339    }
9340}
9341impl Default for COLLISION_DATA {
9342    fn default() -> Self {
9343        Self::DEFAULT.clone()
9344    }
9345}
9346impl MessageData for COLLISION_DATA {
9347    type Message = MavMessage;
9348    const ID: u32 = 247u32;
9349    const NAME: &'static str = "COLLISION";
9350    const EXTRA_CRC: u8 = 81u8;
9351    const ENCODED_LEN: usize = 19usize;
9352    fn deser(
9353        _version: MavlinkVersion,
9354        __input: &[u8],
9355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9356        let avail_len = __input.len();
9357        let mut payload_buf = [0; Self::ENCODED_LEN];
9358        let mut buf = if avail_len < Self::ENCODED_LEN {
9359            payload_buf[0..avail_len].copy_from_slice(__input);
9360            Bytes::new(&payload_buf)
9361        } else {
9362            Bytes::new(__input)
9363        };
9364        let mut __struct = Self::default();
9365        __struct.id = buf.get_u32_le();
9366        __struct.time_to_minimum_delta = buf.get_f32_le();
9367        __struct.altitude_minimum_delta = buf.get_f32_le();
9368        __struct.horizontal_minimum_delta = buf.get_f32_le();
9369        let tmp = buf.get_u8();
9370        __struct.src =
9371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9372                enum_type: "MavCollisionSrc",
9373                value: tmp as u32,
9374            })?;
9375        let tmp = buf.get_u8();
9376        __struct.action =
9377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9378                enum_type: "MavCollisionAction",
9379                value: tmp as u32,
9380            })?;
9381        let tmp = buf.get_u8();
9382        __struct.threat_level =
9383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9384                enum_type: "MavCollisionThreatLevel",
9385                value: tmp as u32,
9386            })?;
9387        Ok(__struct)
9388    }
9389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9390        let mut __tmp = BytesMut::new(bytes);
9391        #[allow(clippy::absurd_extreme_comparisons)]
9392        #[allow(unused_comparisons)]
9393        if __tmp.remaining() < Self::ENCODED_LEN {
9394            panic!(
9395                "buffer is too small (need {} bytes, but got {})",
9396                Self::ENCODED_LEN,
9397                __tmp.remaining(),
9398            )
9399        }
9400        __tmp.put_u32_le(self.id);
9401        __tmp.put_f32_le(self.time_to_minimum_delta);
9402        __tmp.put_f32_le(self.altitude_minimum_delta);
9403        __tmp.put_f32_le(self.horizontal_minimum_delta);
9404        __tmp.put_u8(self.src as u8);
9405        __tmp.put_u8(self.action as u8);
9406        __tmp.put_u8(self.threat_level as u8);
9407        if matches!(version, MavlinkVersion::V2) {
9408            let len = __tmp.len();
9409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9410        } else {
9411            __tmp.len()
9412        }
9413    }
9414}
9415#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9416#[doc = ""]
9417#[doc = "ID: 77"]
9418#[derive(Debug, Clone, PartialEq)]
9419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9421#[cfg_attr(feature = "ts", derive(TS))]
9422#[cfg_attr(feature = "ts", ts(export))]
9423pub struct COMMAND_ACK_DATA {
9424    #[doc = "Command ID (of acknowledged command)."]
9425    pub command: MavCmd,
9426    #[doc = "Result of command."]
9427    pub result: MavResult,
9428    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9430    pub progress: u8,
9431    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9433    pub result_param2: i32,
9434    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9436    pub target_system: u8,
9437    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9439    pub target_component: u8,
9440}
9441impl COMMAND_ACK_DATA {
9442    pub const ENCODED_LEN: usize = 10usize;
9443    pub const DEFAULT: Self = Self {
9444        command: MavCmd::DEFAULT,
9445        result: MavResult::DEFAULT,
9446        progress: 0_u8,
9447        result_param2: 0_i32,
9448        target_system: 0_u8,
9449        target_component: 0_u8,
9450    };
9451    #[cfg(feature = "arbitrary")]
9452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9453        use arbitrary::{Arbitrary, Unstructured};
9454        let mut buf = [0u8; 1024];
9455        rng.fill_bytes(&mut buf);
9456        let mut unstructured = Unstructured::new(&buf);
9457        Self::arbitrary(&mut unstructured).unwrap_or_default()
9458    }
9459}
9460impl Default for COMMAND_ACK_DATA {
9461    fn default() -> Self {
9462        Self::DEFAULT.clone()
9463    }
9464}
9465impl MessageData for COMMAND_ACK_DATA {
9466    type Message = MavMessage;
9467    const ID: u32 = 77u32;
9468    const NAME: &'static str = "COMMAND_ACK";
9469    const EXTRA_CRC: u8 = 143u8;
9470    const ENCODED_LEN: usize = 10usize;
9471    fn deser(
9472        _version: MavlinkVersion,
9473        __input: &[u8],
9474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9475        let avail_len = __input.len();
9476        let mut payload_buf = [0; Self::ENCODED_LEN];
9477        let mut buf = if avail_len < Self::ENCODED_LEN {
9478            payload_buf[0..avail_len].copy_from_slice(__input);
9479            Bytes::new(&payload_buf)
9480        } else {
9481            Bytes::new(__input)
9482        };
9483        let mut __struct = Self::default();
9484        let tmp = buf.get_u16_le();
9485        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9486            ::mavlink_core::error::ParserError::InvalidEnum {
9487                enum_type: "MavCmd",
9488                value: tmp as u32,
9489            },
9490        )?;
9491        let tmp = buf.get_u8();
9492        __struct.result =
9493            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9494                enum_type: "MavResult",
9495                value: tmp as u32,
9496            })?;
9497        __struct.progress = buf.get_u8();
9498        __struct.result_param2 = buf.get_i32_le();
9499        __struct.target_system = buf.get_u8();
9500        __struct.target_component = buf.get_u8();
9501        Ok(__struct)
9502    }
9503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9504        let mut __tmp = BytesMut::new(bytes);
9505        #[allow(clippy::absurd_extreme_comparisons)]
9506        #[allow(unused_comparisons)]
9507        if __tmp.remaining() < Self::ENCODED_LEN {
9508            panic!(
9509                "buffer is too small (need {} bytes, but got {})",
9510                Self::ENCODED_LEN,
9511                __tmp.remaining(),
9512            )
9513        }
9514        __tmp.put_u16_le(self.command as u16);
9515        __tmp.put_u8(self.result as u8);
9516        if matches!(version, MavlinkVersion::V2) {
9517            __tmp.put_u8(self.progress);
9518            __tmp.put_i32_le(self.result_param2);
9519            __tmp.put_u8(self.target_system);
9520            __tmp.put_u8(self.target_component);
9521            let len = __tmp.len();
9522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9523        } else {
9524            __tmp.len()
9525        }
9526    }
9527}
9528#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9529#[doc = ""]
9530#[doc = "ID: 80"]
9531#[derive(Debug, Clone, PartialEq)]
9532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9534#[cfg_attr(feature = "ts", derive(TS))]
9535#[cfg_attr(feature = "ts", ts(export))]
9536pub struct COMMAND_CANCEL_DATA {
9537    #[doc = "Command ID (of command to cancel)."]
9538    pub command: MavCmd,
9539    #[doc = "System executing long running command. Should not be broadcast (0)."]
9540    pub target_system: u8,
9541    #[doc = "Component executing long running command."]
9542    pub target_component: u8,
9543}
9544impl COMMAND_CANCEL_DATA {
9545    pub const ENCODED_LEN: usize = 4usize;
9546    pub const DEFAULT: Self = Self {
9547        command: MavCmd::DEFAULT,
9548        target_system: 0_u8,
9549        target_component: 0_u8,
9550    };
9551    #[cfg(feature = "arbitrary")]
9552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9553        use arbitrary::{Arbitrary, Unstructured};
9554        let mut buf = [0u8; 1024];
9555        rng.fill_bytes(&mut buf);
9556        let mut unstructured = Unstructured::new(&buf);
9557        Self::arbitrary(&mut unstructured).unwrap_or_default()
9558    }
9559}
9560impl Default for COMMAND_CANCEL_DATA {
9561    fn default() -> Self {
9562        Self::DEFAULT.clone()
9563    }
9564}
9565impl MessageData for COMMAND_CANCEL_DATA {
9566    type Message = MavMessage;
9567    const ID: u32 = 80u32;
9568    const NAME: &'static str = "COMMAND_CANCEL";
9569    const EXTRA_CRC: u8 = 14u8;
9570    const ENCODED_LEN: usize = 4usize;
9571    fn deser(
9572        _version: MavlinkVersion,
9573        __input: &[u8],
9574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9575        let avail_len = __input.len();
9576        let mut payload_buf = [0; Self::ENCODED_LEN];
9577        let mut buf = if avail_len < Self::ENCODED_LEN {
9578            payload_buf[0..avail_len].copy_from_slice(__input);
9579            Bytes::new(&payload_buf)
9580        } else {
9581            Bytes::new(__input)
9582        };
9583        let mut __struct = Self::default();
9584        let tmp = buf.get_u16_le();
9585        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9586            ::mavlink_core::error::ParserError::InvalidEnum {
9587                enum_type: "MavCmd",
9588                value: tmp as u32,
9589            },
9590        )?;
9591        __struct.target_system = buf.get_u8();
9592        __struct.target_component = buf.get_u8();
9593        Ok(__struct)
9594    }
9595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9596        let mut __tmp = BytesMut::new(bytes);
9597        #[allow(clippy::absurd_extreme_comparisons)]
9598        #[allow(unused_comparisons)]
9599        if __tmp.remaining() < Self::ENCODED_LEN {
9600            panic!(
9601                "buffer is too small (need {} bytes, but got {})",
9602                Self::ENCODED_LEN,
9603                __tmp.remaining(),
9604            )
9605        }
9606        __tmp.put_u16_le(self.command as u16);
9607        __tmp.put_u8(self.target_system);
9608        __tmp.put_u8(self.target_component);
9609        if matches!(version, MavlinkVersion::V2) {
9610            let len = __tmp.len();
9611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9612        } else {
9613            __tmp.len()
9614        }
9615    }
9616}
9617#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9618#[doc = ""]
9619#[doc = "ID: 75"]
9620#[derive(Debug, Clone, PartialEq)]
9621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9623#[cfg_attr(feature = "ts", derive(TS))]
9624#[cfg_attr(feature = "ts", ts(export))]
9625pub struct COMMAND_INT_DATA {
9626    #[doc = "PARAM1, see MAV_CMD enum"]
9627    pub param1: f32,
9628    #[doc = "PARAM2, see MAV_CMD enum"]
9629    pub param2: f32,
9630    #[doc = "PARAM3, see MAV_CMD enum"]
9631    pub param3: f32,
9632    #[doc = "PARAM4, see MAV_CMD enum"]
9633    pub param4: f32,
9634    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9635    pub x: i32,
9636    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9637    pub y: i32,
9638    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9639    pub z: f32,
9640    #[doc = "The scheduled action for the mission item."]
9641    pub command: MavCmd,
9642    #[doc = "System ID"]
9643    pub target_system: u8,
9644    #[doc = "Component ID"]
9645    pub target_component: u8,
9646    #[doc = "The coordinate system of the COMMAND."]
9647    pub frame: MavFrame,
9648    #[doc = "Not used."]
9649    pub current: u8,
9650    #[doc = "Not used (set 0)."]
9651    pub autocontinue: u8,
9652}
9653impl COMMAND_INT_DATA {
9654    pub const ENCODED_LEN: usize = 35usize;
9655    pub const DEFAULT: Self = Self {
9656        param1: 0.0_f32,
9657        param2: 0.0_f32,
9658        param3: 0.0_f32,
9659        param4: 0.0_f32,
9660        x: 0_i32,
9661        y: 0_i32,
9662        z: 0.0_f32,
9663        command: MavCmd::DEFAULT,
9664        target_system: 0_u8,
9665        target_component: 0_u8,
9666        frame: MavFrame::DEFAULT,
9667        current: 0_u8,
9668        autocontinue: 0_u8,
9669    };
9670    #[cfg(feature = "arbitrary")]
9671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9672        use arbitrary::{Arbitrary, Unstructured};
9673        let mut buf = [0u8; 1024];
9674        rng.fill_bytes(&mut buf);
9675        let mut unstructured = Unstructured::new(&buf);
9676        Self::arbitrary(&mut unstructured).unwrap_or_default()
9677    }
9678}
9679impl Default for COMMAND_INT_DATA {
9680    fn default() -> Self {
9681        Self::DEFAULT.clone()
9682    }
9683}
9684impl MessageData for COMMAND_INT_DATA {
9685    type Message = MavMessage;
9686    const ID: u32 = 75u32;
9687    const NAME: &'static str = "COMMAND_INT";
9688    const EXTRA_CRC: u8 = 158u8;
9689    const ENCODED_LEN: usize = 35usize;
9690    fn deser(
9691        _version: MavlinkVersion,
9692        __input: &[u8],
9693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9694        let avail_len = __input.len();
9695        let mut payload_buf = [0; Self::ENCODED_LEN];
9696        let mut buf = if avail_len < Self::ENCODED_LEN {
9697            payload_buf[0..avail_len].copy_from_slice(__input);
9698            Bytes::new(&payload_buf)
9699        } else {
9700            Bytes::new(__input)
9701        };
9702        let mut __struct = Self::default();
9703        __struct.param1 = buf.get_f32_le();
9704        __struct.param2 = buf.get_f32_le();
9705        __struct.param3 = buf.get_f32_le();
9706        __struct.param4 = buf.get_f32_le();
9707        __struct.x = buf.get_i32_le();
9708        __struct.y = buf.get_i32_le();
9709        __struct.z = buf.get_f32_le();
9710        let tmp = buf.get_u16_le();
9711        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9712            ::mavlink_core::error::ParserError::InvalidEnum {
9713                enum_type: "MavCmd",
9714                value: tmp as u32,
9715            },
9716        )?;
9717        __struct.target_system = buf.get_u8();
9718        __struct.target_component = buf.get_u8();
9719        let tmp = buf.get_u8();
9720        __struct.frame =
9721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9722                enum_type: "MavFrame",
9723                value: tmp as u32,
9724            })?;
9725        __struct.current = buf.get_u8();
9726        __struct.autocontinue = buf.get_u8();
9727        Ok(__struct)
9728    }
9729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9730        let mut __tmp = BytesMut::new(bytes);
9731        #[allow(clippy::absurd_extreme_comparisons)]
9732        #[allow(unused_comparisons)]
9733        if __tmp.remaining() < Self::ENCODED_LEN {
9734            panic!(
9735                "buffer is too small (need {} bytes, but got {})",
9736                Self::ENCODED_LEN,
9737                __tmp.remaining(),
9738            )
9739        }
9740        __tmp.put_f32_le(self.param1);
9741        __tmp.put_f32_le(self.param2);
9742        __tmp.put_f32_le(self.param3);
9743        __tmp.put_f32_le(self.param4);
9744        __tmp.put_i32_le(self.x);
9745        __tmp.put_i32_le(self.y);
9746        __tmp.put_f32_le(self.z);
9747        __tmp.put_u16_le(self.command as u16);
9748        __tmp.put_u8(self.target_system);
9749        __tmp.put_u8(self.target_component);
9750        __tmp.put_u8(self.frame as u8);
9751        __tmp.put_u8(self.current);
9752        __tmp.put_u8(self.autocontinue);
9753        if matches!(version, MavlinkVersion::V2) {
9754            let len = __tmp.len();
9755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9756        } else {
9757            __tmp.len()
9758        }
9759    }
9760}
9761#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9762#[doc = ""]
9763#[doc = "ID: 76"]
9764#[derive(Debug, Clone, PartialEq)]
9765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9767#[cfg_attr(feature = "ts", derive(TS))]
9768#[cfg_attr(feature = "ts", ts(export))]
9769pub struct COMMAND_LONG_DATA {
9770    #[doc = "Parameter 1 (for the specific command)."]
9771    pub param1: f32,
9772    #[doc = "Parameter 2 (for the specific command)."]
9773    pub param2: f32,
9774    #[doc = "Parameter 3 (for the specific command)."]
9775    pub param3: f32,
9776    #[doc = "Parameter 4 (for the specific command)."]
9777    pub param4: f32,
9778    #[doc = "Parameter 5 (for the specific command)."]
9779    pub param5: f32,
9780    #[doc = "Parameter 6 (for the specific command)."]
9781    pub param6: f32,
9782    #[doc = "Parameter 7 (for the specific command)."]
9783    pub param7: f32,
9784    #[doc = "Command ID (of command to send)."]
9785    pub command: MavCmd,
9786    #[doc = "System which should execute the command"]
9787    pub target_system: u8,
9788    #[doc = "Component which should execute the command, 0 for all components"]
9789    pub target_component: u8,
9790    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9791    pub confirmation: u8,
9792}
9793impl COMMAND_LONG_DATA {
9794    pub const ENCODED_LEN: usize = 33usize;
9795    pub const DEFAULT: Self = Self {
9796        param1: 0.0_f32,
9797        param2: 0.0_f32,
9798        param3: 0.0_f32,
9799        param4: 0.0_f32,
9800        param5: 0.0_f32,
9801        param6: 0.0_f32,
9802        param7: 0.0_f32,
9803        command: MavCmd::DEFAULT,
9804        target_system: 0_u8,
9805        target_component: 0_u8,
9806        confirmation: 0_u8,
9807    };
9808    #[cfg(feature = "arbitrary")]
9809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9810        use arbitrary::{Arbitrary, Unstructured};
9811        let mut buf = [0u8; 1024];
9812        rng.fill_bytes(&mut buf);
9813        let mut unstructured = Unstructured::new(&buf);
9814        Self::arbitrary(&mut unstructured).unwrap_or_default()
9815    }
9816}
9817impl Default for COMMAND_LONG_DATA {
9818    fn default() -> Self {
9819        Self::DEFAULT.clone()
9820    }
9821}
9822impl MessageData for COMMAND_LONG_DATA {
9823    type Message = MavMessage;
9824    const ID: u32 = 76u32;
9825    const NAME: &'static str = "COMMAND_LONG";
9826    const EXTRA_CRC: u8 = 152u8;
9827    const ENCODED_LEN: usize = 33usize;
9828    fn deser(
9829        _version: MavlinkVersion,
9830        __input: &[u8],
9831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9832        let avail_len = __input.len();
9833        let mut payload_buf = [0; Self::ENCODED_LEN];
9834        let mut buf = if avail_len < Self::ENCODED_LEN {
9835            payload_buf[0..avail_len].copy_from_slice(__input);
9836            Bytes::new(&payload_buf)
9837        } else {
9838            Bytes::new(__input)
9839        };
9840        let mut __struct = Self::default();
9841        __struct.param1 = buf.get_f32_le();
9842        __struct.param2 = buf.get_f32_le();
9843        __struct.param3 = buf.get_f32_le();
9844        __struct.param4 = buf.get_f32_le();
9845        __struct.param5 = buf.get_f32_le();
9846        __struct.param6 = buf.get_f32_le();
9847        __struct.param7 = buf.get_f32_le();
9848        let tmp = buf.get_u16_le();
9849        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9850            ::mavlink_core::error::ParserError::InvalidEnum {
9851                enum_type: "MavCmd",
9852                value: tmp as u32,
9853            },
9854        )?;
9855        __struct.target_system = buf.get_u8();
9856        __struct.target_component = buf.get_u8();
9857        __struct.confirmation = buf.get_u8();
9858        Ok(__struct)
9859    }
9860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9861        let mut __tmp = BytesMut::new(bytes);
9862        #[allow(clippy::absurd_extreme_comparisons)]
9863        #[allow(unused_comparisons)]
9864        if __tmp.remaining() < Self::ENCODED_LEN {
9865            panic!(
9866                "buffer is too small (need {} bytes, but got {})",
9867                Self::ENCODED_LEN,
9868                __tmp.remaining(),
9869            )
9870        }
9871        __tmp.put_f32_le(self.param1);
9872        __tmp.put_f32_le(self.param2);
9873        __tmp.put_f32_le(self.param3);
9874        __tmp.put_f32_le(self.param4);
9875        __tmp.put_f32_le(self.param5);
9876        __tmp.put_f32_le(self.param6);
9877        __tmp.put_f32_le(self.param7);
9878        __tmp.put_u16_le(self.command as u16);
9879        __tmp.put_u8(self.target_system);
9880        __tmp.put_u8(self.target_component);
9881        __tmp.put_u8(self.confirmation);
9882        if matches!(version, MavlinkVersion::V2) {
9883            let len = __tmp.len();
9884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9885        } else {
9886            __tmp.len()
9887        }
9888    }
9889}
9890#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9891#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9892#[doc = ""]
9893#[doc = "ID: 395"]
9894#[derive(Debug, Clone, PartialEq)]
9895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9897#[cfg_attr(feature = "ts", derive(TS))]
9898#[cfg_attr(feature = "ts", ts(export))]
9899pub struct COMPONENT_INFORMATION_DATA {
9900    #[doc = "Timestamp (time since system boot)."]
9901    pub time_boot_ms: u32,
9902    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9903    pub general_metadata_file_crc: u32,
9904    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9905    pub peripherals_metadata_file_crc: u32,
9906    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9907    #[cfg_attr(
9908        feature = "serde",
9909        serde(
9910            serialize_with = "crate::nulstr::serialize::<_, 100>",
9911            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9912        )
9913    )]
9914    #[cfg_attr(feature = "ts", ts(type = "string"))]
9915    pub general_metadata_uri: [u8; 100],
9916    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9917    #[cfg_attr(
9918        feature = "serde",
9919        serde(
9920            serialize_with = "crate::nulstr::serialize::<_, 100>",
9921            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
9922        )
9923    )]
9924    #[cfg_attr(feature = "ts", ts(type = "string"))]
9925    pub peripherals_metadata_uri: [u8; 100],
9926}
9927impl COMPONENT_INFORMATION_DATA {
9928    pub const ENCODED_LEN: usize = 212usize;
9929    pub const DEFAULT: Self = Self {
9930        time_boot_ms: 0_u32,
9931        general_metadata_file_crc: 0_u32,
9932        peripherals_metadata_file_crc: 0_u32,
9933        general_metadata_uri: [0_u8; 100usize],
9934        peripherals_metadata_uri: [0_u8; 100usize],
9935    };
9936    #[cfg(feature = "arbitrary")]
9937    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9938        use arbitrary::{Arbitrary, Unstructured};
9939        let mut buf = [0u8; 1024];
9940        rng.fill_bytes(&mut buf);
9941        let mut unstructured = Unstructured::new(&buf);
9942        Self::arbitrary(&mut unstructured).unwrap_or_default()
9943    }
9944}
9945impl Default for COMPONENT_INFORMATION_DATA {
9946    fn default() -> Self {
9947        Self::DEFAULT.clone()
9948    }
9949}
9950impl MessageData for COMPONENT_INFORMATION_DATA {
9951    type Message = MavMessage;
9952    const ID: u32 = 395u32;
9953    const NAME: &'static str = "COMPONENT_INFORMATION";
9954    const EXTRA_CRC: u8 = 0u8;
9955    const ENCODED_LEN: usize = 212usize;
9956    fn deser(
9957        _version: MavlinkVersion,
9958        __input: &[u8],
9959    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9960        let avail_len = __input.len();
9961        let mut payload_buf = [0; Self::ENCODED_LEN];
9962        let mut buf = if avail_len < Self::ENCODED_LEN {
9963            payload_buf[0..avail_len].copy_from_slice(__input);
9964            Bytes::new(&payload_buf)
9965        } else {
9966            Bytes::new(__input)
9967        };
9968        let mut __struct = Self::default();
9969        __struct.time_boot_ms = buf.get_u32_le();
9970        __struct.general_metadata_file_crc = buf.get_u32_le();
9971        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9972        for v in &mut __struct.general_metadata_uri {
9973            let val = buf.get_u8();
9974            *v = val;
9975        }
9976        for v in &mut __struct.peripherals_metadata_uri {
9977            let val = buf.get_u8();
9978            *v = val;
9979        }
9980        Ok(__struct)
9981    }
9982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9983        let mut __tmp = BytesMut::new(bytes);
9984        #[allow(clippy::absurd_extreme_comparisons)]
9985        #[allow(unused_comparisons)]
9986        if __tmp.remaining() < Self::ENCODED_LEN {
9987            panic!(
9988                "buffer is too small (need {} bytes, but got {})",
9989                Self::ENCODED_LEN,
9990                __tmp.remaining(),
9991            )
9992        }
9993        __tmp.put_u32_le(self.time_boot_ms);
9994        __tmp.put_u32_le(self.general_metadata_file_crc);
9995        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9996        for val in &self.general_metadata_uri {
9997            __tmp.put_u8(*val);
9998        }
9999        for val in &self.peripherals_metadata_uri {
10000            __tmp.put_u8(*val);
10001        }
10002        if matches!(version, MavlinkVersion::V2) {
10003            let len = __tmp.len();
10004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10005        } else {
10006            __tmp.len()
10007        }
10008    }
10009}
10010#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10011#[doc = ""]
10012#[doc = "ID: 396"]
10013#[derive(Debug, Clone, PartialEq)]
10014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10016#[cfg_attr(feature = "ts", derive(TS))]
10017#[cfg_attr(feature = "ts", ts(export))]
10018pub struct COMPONENT_INFORMATION_BASIC_DATA {
10019    #[doc = "Component capability flags"]
10020    pub capabilities: MavProtocolCapability,
10021    #[doc = "Timestamp (time since system boot)."]
10022    pub time_boot_ms: u32,
10023    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10024    pub time_manufacture_s: u32,
10025    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10026    #[cfg_attr(
10027        feature = "serde",
10028        serde(
10029            serialize_with = "crate::nulstr::serialize::<_, 32>",
10030            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
10031        )
10032    )]
10033    #[cfg_attr(feature = "ts", ts(type = "string"))]
10034    pub vendor_name: [u8; 32],
10035    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10036    #[cfg_attr(
10037        feature = "serde",
10038        serde(
10039            serialize_with = "crate::nulstr::serialize::<_, 32>",
10040            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
10041        )
10042    )]
10043    #[cfg_attr(feature = "ts", ts(type = "string"))]
10044    pub model_name: [u8; 32],
10045    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10046    #[cfg_attr(
10047        feature = "serde",
10048        serde(
10049            serialize_with = "crate::nulstr::serialize::<_, 24>",
10050            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
10051        )
10052    )]
10053    #[cfg_attr(feature = "ts", ts(type = "string"))]
10054    pub software_version: [u8; 24],
10055    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10056    #[cfg_attr(
10057        feature = "serde",
10058        serde(
10059            serialize_with = "crate::nulstr::serialize::<_, 24>",
10060            deserialize_with = "crate::nulstr::deserialize::<_, 24>"
10061        )
10062    )]
10063    #[cfg_attr(feature = "ts", ts(type = "string"))]
10064    pub hardware_version: [u8; 24],
10065    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10066    #[cfg_attr(
10067        feature = "serde",
10068        serde(
10069            serialize_with = "crate::nulstr::serialize::<_, 32>",
10070            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
10071        )
10072    )]
10073    #[cfg_attr(feature = "ts", ts(type = "string"))]
10074    pub serial_number: [u8; 32],
10075}
10076impl COMPONENT_INFORMATION_BASIC_DATA {
10077    pub const ENCODED_LEN: usize = 160usize;
10078    pub const DEFAULT: Self = Self {
10079        capabilities: MavProtocolCapability::DEFAULT,
10080        time_boot_ms: 0_u32,
10081        time_manufacture_s: 0_u32,
10082        vendor_name: [0_u8; 32usize],
10083        model_name: [0_u8; 32usize],
10084        software_version: [0_u8; 24usize],
10085        hardware_version: [0_u8; 24usize],
10086        serial_number: [0_u8; 32usize],
10087    };
10088    #[cfg(feature = "arbitrary")]
10089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10090        use arbitrary::{Arbitrary, Unstructured};
10091        let mut buf = [0u8; 1024];
10092        rng.fill_bytes(&mut buf);
10093        let mut unstructured = Unstructured::new(&buf);
10094        Self::arbitrary(&mut unstructured).unwrap_or_default()
10095    }
10096}
10097impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10098    fn default() -> Self {
10099        Self::DEFAULT.clone()
10100    }
10101}
10102impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10103    type Message = MavMessage;
10104    const ID: u32 = 396u32;
10105    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10106    const EXTRA_CRC: u8 = 50u8;
10107    const ENCODED_LEN: usize = 160usize;
10108    fn deser(
10109        _version: MavlinkVersion,
10110        __input: &[u8],
10111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10112        let avail_len = __input.len();
10113        let mut payload_buf = [0; Self::ENCODED_LEN];
10114        let mut buf = if avail_len < Self::ENCODED_LEN {
10115            payload_buf[0..avail_len].copy_from_slice(__input);
10116            Bytes::new(&payload_buf)
10117        } else {
10118            Bytes::new(__input)
10119        };
10120        let mut __struct = Self::default();
10121        let tmp = buf.get_u64_le();
10122        __struct.capabilities = MavProtocolCapability::from_bits(
10123            tmp & MavProtocolCapability::all().bits(),
10124        )
10125        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10126            flag_type: "MavProtocolCapability",
10127            value: tmp as u32,
10128        })?;
10129        __struct.time_boot_ms = buf.get_u32_le();
10130        __struct.time_manufacture_s = buf.get_u32_le();
10131        for v in &mut __struct.vendor_name {
10132            let val = buf.get_u8();
10133            *v = val;
10134        }
10135        for v in &mut __struct.model_name {
10136            let val = buf.get_u8();
10137            *v = val;
10138        }
10139        for v in &mut __struct.software_version {
10140            let val = buf.get_u8();
10141            *v = val;
10142        }
10143        for v in &mut __struct.hardware_version {
10144            let val = buf.get_u8();
10145            *v = val;
10146        }
10147        for v in &mut __struct.serial_number {
10148            let val = buf.get_u8();
10149            *v = val;
10150        }
10151        Ok(__struct)
10152    }
10153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10154        let mut __tmp = BytesMut::new(bytes);
10155        #[allow(clippy::absurd_extreme_comparisons)]
10156        #[allow(unused_comparisons)]
10157        if __tmp.remaining() < Self::ENCODED_LEN {
10158            panic!(
10159                "buffer is too small (need {} bytes, but got {})",
10160                Self::ENCODED_LEN,
10161                __tmp.remaining(),
10162            )
10163        }
10164        __tmp.put_u64_le(self.capabilities.bits());
10165        __tmp.put_u32_le(self.time_boot_ms);
10166        __tmp.put_u32_le(self.time_manufacture_s);
10167        for val in &self.vendor_name {
10168            __tmp.put_u8(*val);
10169        }
10170        for val in &self.model_name {
10171            __tmp.put_u8(*val);
10172        }
10173        for val in &self.software_version {
10174            __tmp.put_u8(*val);
10175        }
10176        for val in &self.hardware_version {
10177            __tmp.put_u8(*val);
10178        }
10179        for val in &self.serial_number {
10180            __tmp.put_u8(*val);
10181        }
10182        if matches!(version, MavlinkVersion::V2) {
10183            let len = __tmp.len();
10184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10185        } else {
10186            __tmp.len()
10187        }
10188    }
10189}
10190#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10191#[doc = ""]
10192#[doc = "ID: 397"]
10193#[derive(Debug, Clone, PartialEq)]
10194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10196#[cfg_attr(feature = "ts", derive(TS))]
10197#[cfg_attr(feature = "ts", ts(export))]
10198pub struct COMPONENT_METADATA_DATA {
10199    #[doc = "Timestamp (time since system boot)."]
10200    pub time_boot_ms: u32,
10201    #[doc = "CRC32 of the general metadata file."]
10202    pub file_crc: u32,
10203    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10204    #[cfg_attr(
10205        feature = "serde",
10206        serde(
10207            serialize_with = "crate::nulstr::serialize::<_, 100>",
10208            deserialize_with = "crate::nulstr::deserialize::<_, 100>"
10209        )
10210    )]
10211    #[cfg_attr(feature = "ts", ts(type = "string"))]
10212    pub uri: [u8; 100],
10213}
10214impl COMPONENT_METADATA_DATA {
10215    pub const ENCODED_LEN: usize = 108usize;
10216    pub const DEFAULT: Self = Self {
10217        time_boot_ms: 0_u32,
10218        file_crc: 0_u32,
10219        uri: [0_u8; 100usize],
10220    };
10221    #[cfg(feature = "arbitrary")]
10222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10223        use arbitrary::{Arbitrary, Unstructured};
10224        let mut buf = [0u8; 1024];
10225        rng.fill_bytes(&mut buf);
10226        let mut unstructured = Unstructured::new(&buf);
10227        Self::arbitrary(&mut unstructured).unwrap_or_default()
10228    }
10229}
10230impl Default for COMPONENT_METADATA_DATA {
10231    fn default() -> Self {
10232        Self::DEFAULT.clone()
10233    }
10234}
10235impl MessageData for COMPONENT_METADATA_DATA {
10236    type Message = MavMessage;
10237    const ID: u32 = 397u32;
10238    const NAME: &'static str = "COMPONENT_METADATA";
10239    const EXTRA_CRC: u8 = 182u8;
10240    const ENCODED_LEN: usize = 108usize;
10241    fn deser(
10242        _version: MavlinkVersion,
10243        __input: &[u8],
10244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10245        let avail_len = __input.len();
10246        let mut payload_buf = [0; Self::ENCODED_LEN];
10247        let mut buf = if avail_len < Self::ENCODED_LEN {
10248            payload_buf[0..avail_len].copy_from_slice(__input);
10249            Bytes::new(&payload_buf)
10250        } else {
10251            Bytes::new(__input)
10252        };
10253        let mut __struct = Self::default();
10254        __struct.time_boot_ms = buf.get_u32_le();
10255        __struct.file_crc = buf.get_u32_le();
10256        for v in &mut __struct.uri {
10257            let val = buf.get_u8();
10258            *v = val;
10259        }
10260        Ok(__struct)
10261    }
10262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10263        let mut __tmp = BytesMut::new(bytes);
10264        #[allow(clippy::absurd_extreme_comparisons)]
10265        #[allow(unused_comparisons)]
10266        if __tmp.remaining() < Self::ENCODED_LEN {
10267            panic!(
10268                "buffer is too small (need {} bytes, but got {})",
10269                Self::ENCODED_LEN,
10270                __tmp.remaining(),
10271            )
10272        }
10273        __tmp.put_u32_le(self.time_boot_ms);
10274        __tmp.put_u32_le(self.file_crc);
10275        for val in &self.uri {
10276            __tmp.put_u8(*val);
10277        }
10278        if matches!(version, MavlinkVersion::V2) {
10279            let len = __tmp.len();
10280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10281        } else {
10282            __tmp.len()
10283        }
10284    }
10285}
10286#[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
10287#[doc = ""]
10288#[doc = "ID: 512"]
10289#[derive(Debug, Clone, PartialEq)]
10290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10292#[cfg_attr(feature = "ts", derive(TS))]
10293#[cfg_attr(feature = "ts", ts(export))]
10294pub struct CONTROL_STATUS_DATA {
10295    #[doc = "System ID of GCS MAVLink component in control (0: no GCS in control)."]
10296    pub sysid_in_control: u8,
10297    #[doc = "Control status. For example, whether takeover is allowed, and whether this message instance defines the default controlling GCS for the whole system."]
10298    pub flags: GcsControlStatusFlags,
10299}
10300impl CONTROL_STATUS_DATA {
10301    pub const ENCODED_LEN: usize = 2usize;
10302    pub const DEFAULT: Self = Self {
10303        sysid_in_control: 0_u8,
10304        flags: GcsControlStatusFlags::DEFAULT,
10305    };
10306    #[cfg(feature = "arbitrary")]
10307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10308        use arbitrary::{Arbitrary, Unstructured};
10309        let mut buf = [0u8; 1024];
10310        rng.fill_bytes(&mut buf);
10311        let mut unstructured = Unstructured::new(&buf);
10312        Self::arbitrary(&mut unstructured).unwrap_or_default()
10313    }
10314}
10315impl Default for CONTROL_STATUS_DATA {
10316    fn default() -> Self {
10317        Self::DEFAULT.clone()
10318    }
10319}
10320impl MessageData for CONTROL_STATUS_DATA {
10321    type Message = MavMessage;
10322    const ID: u32 = 512u32;
10323    const NAME: &'static str = "CONTROL_STATUS";
10324    const EXTRA_CRC: u8 = 184u8;
10325    const ENCODED_LEN: usize = 2usize;
10326    fn deser(
10327        _version: MavlinkVersion,
10328        __input: &[u8],
10329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10330        let avail_len = __input.len();
10331        let mut payload_buf = [0; Self::ENCODED_LEN];
10332        let mut buf = if avail_len < Self::ENCODED_LEN {
10333            payload_buf[0..avail_len].copy_from_slice(__input);
10334            Bytes::new(&payload_buf)
10335        } else {
10336            Bytes::new(__input)
10337        };
10338        let mut __struct = Self::default();
10339        __struct.sysid_in_control = buf.get_u8();
10340        let tmp = buf.get_u8();
10341        __struct.flags = GcsControlStatusFlags::from_bits(
10342            tmp & GcsControlStatusFlags::all().bits(),
10343        )
10344        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10345            flag_type: "GcsControlStatusFlags",
10346            value: tmp as u32,
10347        })?;
10348        Ok(__struct)
10349    }
10350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10351        let mut __tmp = BytesMut::new(bytes);
10352        #[allow(clippy::absurd_extreme_comparisons)]
10353        #[allow(unused_comparisons)]
10354        if __tmp.remaining() < Self::ENCODED_LEN {
10355            panic!(
10356                "buffer is too small (need {} bytes, but got {})",
10357                Self::ENCODED_LEN,
10358                __tmp.remaining(),
10359            )
10360        }
10361        __tmp.put_u8(self.sysid_in_control);
10362        __tmp.put_u8(self.flags.bits());
10363        if matches!(version, MavlinkVersion::V2) {
10364            let len = __tmp.len();
10365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10366        } else {
10367            __tmp.len()
10368        }
10369    }
10370}
10371#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10372#[doc = ""]
10373#[doc = "ID: 146"]
10374#[derive(Debug, Clone, PartialEq)]
10375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10377#[cfg_attr(feature = "ts", derive(TS))]
10378#[cfg_attr(feature = "ts", ts(export))]
10379pub struct CONTROL_SYSTEM_STATE_DATA {
10380    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10381    pub time_usec: u64,
10382    #[doc = "X acceleration in body frame"]
10383    pub x_acc: f32,
10384    #[doc = "Y acceleration in body frame"]
10385    pub y_acc: f32,
10386    #[doc = "Z acceleration in body frame"]
10387    pub z_acc: f32,
10388    #[doc = "X velocity in body frame"]
10389    pub x_vel: f32,
10390    #[doc = "Y velocity in body frame"]
10391    pub y_vel: f32,
10392    #[doc = "Z velocity in body frame"]
10393    pub z_vel: f32,
10394    #[doc = "X position in local frame"]
10395    pub x_pos: f32,
10396    #[doc = "Y position in local frame"]
10397    pub y_pos: f32,
10398    #[doc = "Z position in local frame"]
10399    pub z_pos: f32,
10400    #[doc = "Airspeed, set to -1 if unknown"]
10401    pub airspeed: f32,
10402    #[doc = "Variance of body velocity estimate"]
10403    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10404    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10405    pub vel_variance: [f32; 3],
10406    #[doc = "Variance in local position"]
10407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10409    pub pos_variance: [f32; 3],
10410    #[doc = "The attitude, represented as Quaternion"]
10411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10413    pub q: [f32; 4],
10414    #[doc = "Angular rate in roll axis"]
10415    pub roll_rate: f32,
10416    #[doc = "Angular rate in pitch axis"]
10417    pub pitch_rate: f32,
10418    #[doc = "Angular rate in yaw axis"]
10419    pub yaw_rate: f32,
10420}
10421impl CONTROL_SYSTEM_STATE_DATA {
10422    pub const ENCODED_LEN: usize = 100usize;
10423    pub const DEFAULT: Self = Self {
10424        time_usec: 0_u64,
10425        x_acc: 0.0_f32,
10426        y_acc: 0.0_f32,
10427        z_acc: 0.0_f32,
10428        x_vel: 0.0_f32,
10429        y_vel: 0.0_f32,
10430        z_vel: 0.0_f32,
10431        x_pos: 0.0_f32,
10432        y_pos: 0.0_f32,
10433        z_pos: 0.0_f32,
10434        airspeed: 0.0_f32,
10435        vel_variance: [0.0_f32; 3usize],
10436        pos_variance: [0.0_f32; 3usize],
10437        q: [0.0_f32; 4usize],
10438        roll_rate: 0.0_f32,
10439        pitch_rate: 0.0_f32,
10440        yaw_rate: 0.0_f32,
10441    };
10442    #[cfg(feature = "arbitrary")]
10443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10444        use arbitrary::{Arbitrary, Unstructured};
10445        let mut buf = [0u8; 1024];
10446        rng.fill_bytes(&mut buf);
10447        let mut unstructured = Unstructured::new(&buf);
10448        Self::arbitrary(&mut unstructured).unwrap_or_default()
10449    }
10450}
10451impl Default for CONTROL_SYSTEM_STATE_DATA {
10452    fn default() -> Self {
10453        Self::DEFAULT.clone()
10454    }
10455}
10456impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10457    type Message = MavMessage;
10458    const ID: u32 = 146u32;
10459    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10460    const EXTRA_CRC: u8 = 103u8;
10461    const ENCODED_LEN: usize = 100usize;
10462    fn deser(
10463        _version: MavlinkVersion,
10464        __input: &[u8],
10465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10466        let avail_len = __input.len();
10467        let mut payload_buf = [0; Self::ENCODED_LEN];
10468        let mut buf = if avail_len < Self::ENCODED_LEN {
10469            payload_buf[0..avail_len].copy_from_slice(__input);
10470            Bytes::new(&payload_buf)
10471        } else {
10472            Bytes::new(__input)
10473        };
10474        let mut __struct = Self::default();
10475        __struct.time_usec = buf.get_u64_le();
10476        __struct.x_acc = buf.get_f32_le();
10477        __struct.y_acc = buf.get_f32_le();
10478        __struct.z_acc = buf.get_f32_le();
10479        __struct.x_vel = buf.get_f32_le();
10480        __struct.y_vel = buf.get_f32_le();
10481        __struct.z_vel = buf.get_f32_le();
10482        __struct.x_pos = buf.get_f32_le();
10483        __struct.y_pos = buf.get_f32_le();
10484        __struct.z_pos = buf.get_f32_le();
10485        __struct.airspeed = buf.get_f32_le();
10486        for v in &mut __struct.vel_variance {
10487            let val = buf.get_f32_le();
10488            *v = val;
10489        }
10490        for v in &mut __struct.pos_variance {
10491            let val = buf.get_f32_le();
10492            *v = val;
10493        }
10494        for v in &mut __struct.q {
10495            let val = buf.get_f32_le();
10496            *v = val;
10497        }
10498        __struct.roll_rate = buf.get_f32_le();
10499        __struct.pitch_rate = buf.get_f32_le();
10500        __struct.yaw_rate = buf.get_f32_le();
10501        Ok(__struct)
10502    }
10503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10504        let mut __tmp = BytesMut::new(bytes);
10505        #[allow(clippy::absurd_extreme_comparisons)]
10506        #[allow(unused_comparisons)]
10507        if __tmp.remaining() < Self::ENCODED_LEN {
10508            panic!(
10509                "buffer is too small (need {} bytes, but got {})",
10510                Self::ENCODED_LEN,
10511                __tmp.remaining(),
10512            )
10513        }
10514        __tmp.put_u64_le(self.time_usec);
10515        __tmp.put_f32_le(self.x_acc);
10516        __tmp.put_f32_le(self.y_acc);
10517        __tmp.put_f32_le(self.z_acc);
10518        __tmp.put_f32_le(self.x_vel);
10519        __tmp.put_f32_le(self.y_vel);
10520        __tmp.put_f32_le(self.z_vel);
10521        __tmp.put_f32_le(self.x_pos);
10522        __tmp.put_f32_le(self.y_pos);
10523        __tmp.put_f32_le(self.z_pos);
10524        __tmp.put_f32_le(self.airspeed);
10525        for val in &self.vel_variance {
10526            __tmp.put_f32_le(*val);
10527        }
10528        for val in &self.pos_variance {
10529            __tmp.put_f32_le(*val);
10530        }
10531        for val in &self.q {
10532            __tmp.put_f32_le(*val);
10533        }
10534        __tmp.put_f32_le(self.roll_rate);
10535        __tmp.put_f32_le(self.pitch_rate);
10536        __tmp.put_f32_le(self.yaw_rate);
10537        if matches!(version, MavlinkVersion::V2) {
10538            let len = __tmp.len();
10539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10540        } else {
10541            __tmp.len()
10542        }
10543    }
10544}
10545#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10546#[doc = ""]
10547#[doc = "ID: 411"]
10548#[derive(Debug, Clone, PartialEq)]
10549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10551#[cfg_attr(feature = "ts", derive(TS))]
10552#[cfg_attr(feature = "ts", ts(export))]
10553pub struct CURRENT_EVENT_SEQUENCE_DATA {
10554    #[doc = "Sequence number."]
10555    pub sequence: u16,
10556    #[doc = "Flag bitset."]
10557    pub flags: MavEventCurrentSequenceFlags,
10558}
10559impl CURRENT_EVENT_SEQUENCE_DATA {
10560    pub const ENCODED_LEN: usize = 3usize;
10561    pub const DEFAULT: Self = Self {
10562        sequence: 0_u16,
10563        flags: MavEventCurrentSequenceFlags::DEFAULT,
10564    };
10565    #[cfg(feature = "arbitrary")]
10566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10567        use arbitrary::{Arbitrary, Unstructured};
10568        let mut buf = [0u8; 1024];
10569        rng.fill_bytes(&mut buf);
10570        let mut unstructured = Unstructured::new(&buf);
10571        Self::arbitrary(&mut unstructured).unwrap_or_default()
10572    }
10573}
10574impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10575    fn default() -> Self {
10576        Self::DEFAULT.clone()
10577    }
10578}
10579impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10580    type Message = MavMessage;
10581    const ID: u32 = 411u32;
10582    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10583    const EXTRA_CRC: u8 = 106u8;
10584    const ENCODED_LEN: usize = 3usize;
10585    fn deser(
10586        _version: MavlinkVersion,
10587        __input: &[u8],
10588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10589        let avail_len = __input.len();
10590        let mut payload_buf = [0; Self::ENCODED_LEN];
10591        let mut buf = if avail_len < Self::ENCODED_LEN {
10592            payload_buf[0..avail_len].copy_from_slice(__input);
10593            Bytes::new(&payload_buf)
10594        } else {
10595            Bytes::new(__input)
10596        };
10597        let mut __struct = Self::default();
10598        __struct.sequence = buf.get_u16_le();
10599        let tmp = buf.get_u8();
10600        __struct.flags =
10601            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10602                enum_type: "MavEventCurrentSequenceFlags",
10603                value: tmp as u32,
10604            })?;
10605        Ok(__struct)
10606    }
10607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10608        let mut __tmp = BytesMut::new(bytes);
10609        #[allow(clippy::absurd_extreme_comparisons)]
10610        #[allow(unused_comparisons)]
10611        if __tmp.remaining() < Self::ENCODED_LEN {
10612            panic!(
10613                "buffer is too small (need {} bytes, but got {})",
10614                Self::ENCODED_LEN,
10615                __tmp.remaining(),
10616            )
10617        }
10618        __tmp.put_u16_le(self.sequence);
10619        __tmp.put_u8(self.flags as u8);
10620        if matches!(version, MavlinkVersion::V2) {
10621            let len = __tmp.len();
10622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10623        } else {
10624            __tmp.len()
10625        }
10626    }
10627}
10628#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10629#[doc = ""]
10630#[doc = "ID: 436"]
10631#[derive(Debug, Clone, PartialEq)]
10632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10634#[cfg_attr(feature = "ts", derive(TS))]
10635#[cfg_attr(feature = "ts", ts(export))]
10636pub struct CURRENT_MODE_DATA {
10637    #[doc = "A bitfield for use for autopilot-specific flags"]
10638    pub custom_mode: u32,
10639    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10640    pub intended_custom_mode: u32,
10641    #[doc = "Standard mode."]
10642    pub standard_mode: MavStandardMode,
10643}
10644impl CURRENT_MODE_DATA {
10645    pub const ENCODED_LEN: usize = 9usize;
10646    pub const DEFAULT: Self = Self {
10647        custom_mode: 0_u32,
10648        intended_custom_mode: 0_u32,
10649        standard_mode: MavStandardMode::DEFAULT,
10650    };
10651    #[cfg(feature = "arbitrary")]
10652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10653        use arbitrary::{Arbitrary, Unstructured};
10654        let mut buf = [0u8; 1024];
10655        rng.fill_bytes(&mut buf);
10656        let mut unstructured = Unstructured::new(&buf);
10657        Self::arbitrary(&mut unstructured).unwrap_or_default()
10658    }
10659}
10660impl Default for CURRENT_MODE_DATA {
10661    fn default() -> Self {
10662        Self::DEFAULT.clone()
10663    }
10664}
10665impl MessageData for CURRENT_MODE_DATA {
10666    type Message = MavMessage;
10667    const ID: u32 = 436u32;
10668    const NAME: &'static str = "CURRENT_MODE";
10669    const EXTRA_CRC: u8 = 193u8;
10670    const ENCODED_LEN: usize = 9usize;
10671    fn deser(
10672        _version: MavlinkVersion,
10673        __input: &[u8],
10674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10675        let avail_len = __input.len();
10676        let mut payload_buf = [0; Self::ENCODED_LEN];
10677        let mut buf = if avail_len < Self::ENCODED_LEN {
10678            payload_buf[0..avail_len].copy_from_slice(__input);
10679            Bytes::new(&payload_buf)
10680        } else {
10681            Bytes::new(__input)
10682        };
10683        let mut __struct = Self::default();
10684        __struct.custom_mode = buf.get_u32_le();
10685        __struct.intended_custom_mode = buf.get_u32_le();
10686        let tmp = buf.get_u8();
10687        __struct.standard_mode =
10688            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10689                enum_type: "MavStandardMode",
10690                value: tmp as u32,
10691            })?;
10692        Ok(__struct)
10693    }
10694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10695        let mut __tmp = BytesMut::new(bytes);
10696        #[allow(clippy::absurd_extreme_comparisons)]
10697        #[allow(unused_comparisons)]
10698        if __tmp.remaining() < Self::ENCODED_LEN {
10699            panic!(
10700                "buffer is too small (need {} bytes, but got {})",
10701                Self::ENCODED_LEN,
10702                __tmp.remaining(),
10703            )
10704        }
10705        __tmp.put_u32_le(self.custom_mode);
10706        __tmp.put_u32_le(self.intended_custom_mode);
10707        __tmp.put_u8(self.standard_mode as u8);
10708        if matches!(version, MavlinkVersion::V2) {
10709            let len = __tmp.len();
10710            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10711        } else {
10712            __tmp.len()
10713        }
10714    }
10715}
10716#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10717#[doc = "Data stream status information."]
10718#[doc = ""]
10719#[doc = "ID: 67"]
10720#[derive(Debug, Clone, PartialEq)]
10721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10723#[cfg_attr(feature = "ts", derive(TS))]
10724#[cfg_attr(feature = "ts", ts(export))]
10725pub struct DATA_STREAM_DATA {
10726    #[doc = "The message rate"]
10727    pub message_rate: u16,
10728    #[doc = "The ID of the requested data stream"]
10729    pub stream_id: u8,
10730    #[doc = "1 stream is enabled, 0 stream is stopped."]
10731    pub on_off: u8,
10732}
10733impl DATA_STREAM_DATA {
10734    pub const ENCODED_LEN: usize = 4usize;
10735    pub const DEFAULT: Self = Self {
10736        message_rate: 0_u16,
10737        stream_id: 0_u8,
10738        on_off: 0_u8,
10739    };
10740    #[cfg(feature = "arbitrary")]
10741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10742        use arbitrary::{Arbitrary, Unstructured};
10743        let mut buf = [0u8; 1024];
10744        rng.fill_bytes(&mut buf);
10745        let mut unstructured = Unstructured::new(&buf);
10746        Self::arbitrary(&mut unstructured).unwrap_or_default()
10747    }
10748}
10749impl Default for DATA_STREAM_DATA {
10750    fn default() -> Self {
10751        Self::DEFAULT.clone()
10752    }
10753}
10754impl MessageData for DATA_STREAM_DATA {
10755    type Message = MavMessage;
10756    const ID: u32 = 67u32;
10757    const NAME: &'static str = "DATA_STREAM";
10758    const EXTRA_CRC: u8 = 21u8;
10759    const ENCODED_LEN: usize = 4usize;
10760    fn deser(
10761        _version: MavlinkVersion,
10762        __input: &[u8],
10763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10764        let avail_len = __input.len();
10765        let mut payload_buf = [0; Self::ENCODED_LEN];
10766        let mut buf = if avail_len < Self::ENCODED_LEN {
10767            payload_buf[0..avail_len].copy_from_slice(__input);
10768            Bytes::new(&payload_buf)
10769        } else {
10770            Bytes::new(__input)
10771        };
10772        let mut __struct = Self::default();
10773        __struct.message_rate = buf.get_u16_le();
10774        __struct.stream_id = buf.get_u8();
10775        __struct.on_off = buf.get_u8();
10776        Ok(__struct)
10777    }
10778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10779        let mut __tmp = BytesMut::new(bytes);
10780        #[allow(clippy::absurd_extreme_comparisons)]
10781        #[allow(unused_comparisons)]
10782        if __tmp.remaining() < Self::ENCODED_LEN {
10783            panic!(
10784                "buffer is too small (need {} bytes, but got {})",
10785                Self::ENCODED_LEN,
10786                __tmp.remaining(),
10787            )
10788        }
10789        __tmp.put_u16_le(self.message_rate);
10790        __tmp.put_u8(self.stream_id);
10791        __tmp.put_u8(self.on_off);
10792        if matches!(version, MavlinkVersion::V2) {
10793            let len = __tmp.len();
10794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10795        } else {
10796            __tmp.len()
10797        }
10798    }
10799}
10800#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10801#[doc = ""]
10802#[doc = "ID: 130"]
10803#[derive(Debug, Clone, PartialEq)]
10804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10806#[cfg_attr(feature = "ts", derive(TS))]
10807#[cfg_attr(feature = "ts", ts(export))]
10808pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10809    #[doc = "total data size (set on ACK only)."]
10810    pub size: u32,
10811    #[doc = "Width of a matrix or image."]
10812    pub width: u16,
10813    #[doc = "Height of a matrix or image."]
10814    pub height: u16,
10815    #[doc = "Number of packets being sent (set on ACK only)."]
10816    pub packets: u16,
10817    #[doc = "Type of requested/acknowledged data."]
10818    pub mavtype: MavlinkDataStreamType,
10819    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10820    pub payload: u8,
10821    #[doc = "JPEG quality. Values: [1-100]."]
10822    pub jpg_quality: u8,
10823}
10824impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10825    pub const ENCODED_LEN: usize = 13usize;
10826    pub const DEFAULT: Self = Self {
10827        size: 0_u32,
10828        width: 0_u16,
10829        height: 0_u16,
10830        packets: 0_u16,
10831        mavtype: MavlinkDataStreamType::DEFAULT,
10832        payload: 0_u8,
10833        jpg_quality: 0_u8,
10834    };
10835    #[cfg(feature = "arbitrary")]
10836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10837        use arbitrary::{Arbitrary, Unstructured};
10838        let mut buf = [0u8; 1024];
10839        rng.fill_bytes(&mut buf);
10840        let mut unstructured = Unstructured::new(&buf);
10841        Self::arbitrary(&mut unstructured).unwrap_or_default()
10842    }
10843}
10844impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10845    fn default() -> Self {
10846        Self::DEFAULT.clone()
10847    }
10848}
10849impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10850    type Message = MavMessage;
10851    const ID: u32 = 130u32;
10852    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10853    const EXTRA_CRC: u8 = 29u8;
10854    const ENCODED_LEN: usize = 13usize;
10855    fn deser(
10856        _version: MavlinkVersion,
10857        __input: &[u8],
10858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10859        let avail_len = __input.len();
10860        let mut payload_buf = [0; Self::ENCODED_LEN];
10861        let mut buf = if avail_len < Self::ENCODED_LEN {
10862            payload_buf[0..avail_len].copy_from_slice(__input);
10863            Bytes::new(&payload_buf)
10864        } else {
10865            Bytes::new(__input)
10866        };
10867        let mut __struct = Self::default();
10868        __struct.size = buf.get_u32_le();
10869        __struct.width = buf.get_u16_le();
10870        __struct.height = buf.get_u16_le();
10871        __struct.packets = buf.get_u16_le();
10872        let tmp = buf.get_u8();
10873        __struct.mavtype =
10874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10875                enum_type: "MavlinkDataStreamType",
10876                value: tmp as u32,
10877            })?;
10878        __struct.payload = buf.get_u8();
10879        __struct.jpg_quality = buf.get_u8();
10880        Ok(__struct)
10881    }
10882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10883        let mut __tmp = BytesMut::new(bytes);
10884        #[allow(clippy::absurd_extreme_comparisons)]
10885        #[allow(unused_comparisons)]
10886        if __tmp.remaining() < Self::ENCODED_LEN {
10887            panic!(
10888                "buffer is too small (need {} bytes, but got {})",
10889                Self::ENCODED_LEN,
10890                __tmp.remaining(),
10891            )
10892        }
10893        __tmp.put_u32_le(self.size);
10894        __tmp.put_u16_le(self.width);
10895        __tmp.put_u16_le(self.height);
10896        __tmp.put_u16_le(self.packets);
10897        __tmp.put_u8(self.mavtype as u8);
10898        __tmp.put_u8(self.payload);
10899        __tmp.put_u8(self.jpg_quality);
10900        if matches!(version, MavlinkVersion::V2) {
10901            let len = __tmp.len();
10902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10903        } else {
10904            __tmp.len()
10905        }
10906    }
10907}
10908#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10909#[doc = ""]
10910#[doc = "ID: 254"]
10911#[derive(Debug, Clone, PartialEq)]
10912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10914#[cfg_attr(feature = "ts", derive(TS))]
10915#[cfg_attr(feature = "ts", ts(export))]
10916pub struct DEBUG_DATA {
10917    #[doc = "Timestamp (time since system boot)."]
10918    pub time_boot_ms: u32,
10919    #[doc = "DEBUG value"]
10920    pub value: f32,
10921    #[doc = "index of debug variable"]
10922    pub ind: u8,
10923}
10924impl DEBUG_DATA {
10925    pub const ENCODED_LEN: usize = 9usize;
10926    pub const DEFAULT: Self = Self {
10927        time_boot_ms: 0_u32,
10928        value: 0.0_f32,
10929        ind: 0_u8,
10930    };
10931    #[cfg(feature = "arbitrary")]
10932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10933        use arbitrary::{Arbitrary, Unstructured};
10934        let mut buf = [0u8; 1024];
10935        rng.fill_bytes(&mut buf);
10936        let mut unstructured = Unstructured::new(&buf);
10937        Self::arbitrary(&mut unstructured).unwrap_or_default()
10938    }
10939}
10940impl Default for DEBUG_DATA {
10941    fn default() -> Self {
10942        Self::DEFAULT.clone()
10943    }
10944}
10945impl MessageData for DEBUG_DATA {
10946    type Message = MavMessage;
10947    const ID: u32 = 254u32;
10948    const NAME: &'static str = "DEBUG";
10949    const EXTRA_CRC: u8 = 46u8;
10950    const ENCODED_LEN: usize = 9usize;
10951    fn deser(
10952        _version: MavlinkVersion,
10953        __input: &[u8],
10954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10955        let avail_len = __input.len();
10956        let mut payload_buf = [0; Self::ENCODED_LEN];
10957        let mut buf = if avail_len < Self::ENCODED_LEN {
10958            payload_buf[0..avail_len].copy_from_slice(__input);
10959            Bytes::new(&payload_buf)
10960        } else {
10961            Bytes::new(__input)
10962        };
10963        let mut __struct = Self::default();
10964        __struct.time_boot_ms = buf.get_u32_le();
10965        __struct.value = buf.get_f32_le();
10966        __struct.ind = buf.get_u8();
10967        Ok(__struct)
10968    }
10969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10970        let mut __tmp = BytesMut::new(bytes);
10971        #[allow(clippy::absurd_extreme_comparisons)]
10972        #[allow(unused_comparisons)]
10973        if __tmp.remaining() < Self::ENCODED_LEN {
10974            panic!(
10975                "buffer is too small (need {} bytes, but got {})",
10976                Self::ENCODED_LEN,
10977                __tmp.remaining(),
10978            )
10979        }
10980        __tmp.put_u32_le(self.time_boot_ms);
10981        __tmp.put_f32_le(self.value);
10982        __tmp.put_u8(self.ind);
10983        if matches!(version, MavlinkVersion::V2) {
10984            let len = __tmp.len();
10985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10986        } else {
10987            __tmp.len()
10988        }
10989    }
10990}
10991#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10992#[doc = ""]
10993#[doc = "ID: 350"]
10994#[derive(Debug, Clone, PartialEq)]
10995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10997#[cfg_attr(feature = "ts", derive(TS))]
10998#[cfg_attr(feature = "ts", ts(export))]
10999pub struct DEBUG_FLOAT_ARRAY_DATA {
11000    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11001    pub time_usec: u64,
11002    #[doc = "Unique ID used to discriminate between arrays"]
11003    pub array_id: u16,
11004    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11005    #[cfg_attr(
11006        feature = "serde",
11007        serde(
11008            serialize_with = "crate::nulstr::serialize::<_, 10>",
11009            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
11010        )
11011    )]
11012    #[cfg_attr(feature = "ts", ts(type = "string"))]
11013    pub name: [u8; 10],
11014    #[doc = "data"]
11015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11017    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11018    pub data: [f32; 58],
11019}
11020impl DEBUG_FLOAT_ARRAY_DATA {
11021    pub const ENCODED_LEN: usize = 252usize;
11022    pub const DEFAULT: Self = Self {
11023        time_usec: 0_u64,
11024        array_id: 0_u16,
11025        name: [0_u8; 10usize],
11026        data: [0.0_f32; 58usize],
11027    };
11028    #[cfg(feature = "arbitrary")]
11029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11030        use arbitrary::{Arbitrary, Unstructured};
11031        let mut buf = [0u8; 1024];
11032        rng.fill_bytes(&mut buf);
11033        let mut unstructured = Unstructured::new(&buf);
11034        Self::arbitrary(&mut unstructured).unwrap_or_default()
11035    }
11036}
11037impl Default for DEBUG_FLOAT_ARRAY_DATA {
11038    fn default() -> Self {
11039        Self::DEFAULT.clone()
11040    }
11041}
11042impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11043    type Message = MavMessage;
11044    const ID: u32 = 350u32;
11045    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11046    const EXTRA_CRC: u8 = 232u8;
11047    const ENCODED_LEN: usize = 252usize;
11048    fn deser(
11049        _version: MavlinkVersion,
11050        __input: &[u8],
11051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11052        let avail_len = __input.len();
11053        let mut payload_buf = [0; Self::ENCODED_LEN];
11054        let mut buf = if avail_len < Self::ENCODED_LEN {
11055            payload_buf[0..avail_len].copy_from_slice(__input);
11056            Bytes::new(&payload_buf)
11057        } else {
11058            Bytes::new(__input)
11059        };
11060        let mut __struct = Self::default();
11061        __struct.time_usec = buf.get_u64_le();
11062        __struct.array_id = buf.get_u16_le();
11063        for v in &mut __struct.name {
11064            let val = buf.get_u8();
11065            *v = val;
11066        }
11067        for v in &mut __struct.data {
11068            let val = buf.get_f32_le();
11069            *v = val;
11070        }
11071        Ok(__struct)
11072    }
11073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11074        let mut __tmp = BytesMut::new(bytes);
11075        #[allow(clippy::absurd_extreme_comparisons)]
11076        #[allow(unused_comparisons)]
11077        if __tmp.remaining() < Self::ENCODED_LEN {
11078            panic!(
11079                "buffer is too small (need {} bytes, but got {})",
11080                Self::ENCODED_LEN,
11081                __tmp.remaining(),
11082            )
11083        }
11084        __tmp.put_u64_le(self.time_usec);
11085        __tmp.put_u16_le(self.array_id);
11086        for val in &self.name {
11087            __tmp.put_u8(*val);
11088        }
11089        if matches!(version, MavlinkVersion::V2) {
11090            for val in &self.data {
11091                __tmp.put_f32_le(*val);
11092            }
11093            let len = __tmp.len();
11094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11095        } else {
11096            __tmp.len()
11097        }
11098    }
11099}
11100#[doc = "To debug something using a named 3D vector."]
11101#[doc = ""]
11102#[doc = "ID: 250"]
11103#[derive(Debug, Clone, PartialEq)]
11104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11106#[cfg_attr(feature = "ts", derive(TS))]
11107#[cfg_attr(feature = "ts", ts(export))]
11108pub struct DEBUG_VECT_DATA {
11109    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11110    pub time_usec: u64,
11111    #[doc = "x"]
11112    pub x: f32,
11113    #[doc = "y"]
11114    pub y: f32,
11115    #[doc = "z"]
11116    pub z: f32,
11117    #[doc = "Name"]
11118    #[cfg_attr(
11119        feature = "serde",
11120        serde(
11121            serialize_with = "crate::nulstr::serialize::<_, 10>",
11122            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
11123        )
11124    )]
11125    #[cfg_attr(feature = "ts", ts(type = "string"))]
11126    pub name: [u8; 10],
11127}
11128impl DEBUG_VECT_DATA {
11129    pub const ENCODED_LEN: usize = 30usize;
11130    pub const DEFAULT: Self = Self {
11131        time_usec: 0_u64,
11132        x: 0.0_f32,
11133        y: 0.0_f32,
11134        z: 0.0_f32,
11135        name: [0_u8; 10usize],
11136    };
11137    #[cfg(feature = "arbitrary")]
11138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11139        use arbitrary::{Arbitrary, Unstructured};
11140        let mut buf = [0u8; 1024];
11141        rng.fill_bytes(&mut buf);
11142        let mut unstructured = Unstructured::new(&buf);
11143        Self::arbitrary(&mut unstructured).unwrap_or_default()
11144    }
11145}
11146impl Default for DEBUG_VECT_DATA {
11147    fn default() -> Self {
11148        Self::DEFAULT.clone()
11149    }
11150}
11151impl MessageData for DEBUG_VECT_DATA {
11152    type Message = MavMessage;
11153    const ID: u32 = 250u32;
11154    const NAME: &'static str = "DEBUG_VECT";
11155    const EXTRA_CRC: u8 = 49u8;
11156    const ENCODED_LEN: usize = 30usize;
11157    fn deser(
11158        _version: MavlinkVersion,
11159        __input: &[u8],
11160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11161        let avail_len = __input.len();
11162        let mut payload_buf = [0; Self::ENCODED_LEN];
11163        let mut buf = if avail_len < Self::ENCODED_LEN {
11164            payload_buf[0..avail_len].copy_from_slice(__input);
11165            Bytes::new(&payload_buf)
11166        } else {
11167            Bytes::new(__input)
11168        };
11169        let mut __struct = Self::default();
11170        __struct.time_usec = buf.get_u64_le();
11171        __struct.x = buf.get_f32_le();
11172        __struct.y = buf.get_f32_le();
11173        __struct.z = buf.get_f32_le();
11174        for v in &mut __struct.name {
11175            let val = buf.get_u8();
11176            *v = val;
11177        }
11178        Ok(__struct)
11179    }
11180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11181        let mut __tmp = BytesMut::new(bytes);
11182        #[allow(clippy::absurd_extreme_comparisons)]
11183        #[allow(unused_comparisons)]
11184        if __tmp.remaining() < Self::ENCODED_LEN {
11185            panic!(
11186                "buffer is too small (need {} bytes, but got {})",
11187                Self::ENCODED_LEN,
11188                __tmp.remaining(),
11189            )
11190        }
11191        __tmp.put_u64_le(self.time_usec);
11192        __tmp.put_f32_le(self.x);
11193        __tmp.put_f32_le(self.y);
11194        __tmp.put_f32_le(self.z);
11195        for val in &self.name {
11196            __tmp.put_u8(*val);
11197        }
11198        if matches!(version, MavlinkVersion::V2) {
11199            let len = __tmp.len();
11200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11201        } else {
11202            __tmp.len()
11203        }
11204    }
11205}
11206#[doc = "Distance sensor information for an onboard rangefinder."]
11207#[doc = ""]
11208#[doc = "ID: 132"]
11209#[derive(Debug, Clone, PartialEq)]
11210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11212#[cfg_attr(feature = "ts", derive(TS))]
11213#[cfg_attr(feature = "ts", ts(export))]
11214pub struct DISTANCE_SENSOR_DATA {
11215    #[doc = "Timestamp (time since system boot)."]
11216    pub time_boot_ms: u32,
11217    #[doc = "Minimum distance the sensor can measure"]
11218    pub min_distance: u16,
11219    #[doc = "Maximum distance the sensor can measure"]
11220    pub max_distance: u16,
11221    #[doc = "Current distance reading"]
11222    pub current_distance: u16,
11223    #[doc = "Type of distance sensor."]
11224    pub mavtype: MavDistanceSensor,
11225    #[doc = "Onboard ID of the sensor"]
11226    pub id: u8,
11227    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11228    pub orientation: MavSensorOrientation,
11229    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11230    pub covariance: u8,
11231    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11233    pub horizontal_fov: f32,
11234    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11236    pub vertical_fov: f32,
11237    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11238    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11240    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11241    pub quaternion: [f32; 4],
11242    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11244    pub signal_quality: u8,
11245}
11246impl DISTANCE_SENSOR_DATA {
11247    pub const ENCODED_LEN: usize = 39usize;
11248    pub const DEFAULT: Self = Self {
11249        time_boot_ms: 0_u32,
11250        min_distance: 0_u16,
11251        max_distance: 0_u16,
11252        current_distance: 0_u16,
11253        mavtype: MavDistanceSensor::DEFAULT,
11254        id: 0_u8,
11255        orientation: MavSensorOrientation::DEFAULT,
11256        covariance: 0_u8,
11257        horizontal_fov: 0.0_f32,
11258        vertical_fov: 0.0_f32,
11259        quaternion: [0.0_f32; 4usize],
11260        signal_quality: 0_u8,
11261    };
11262    #[cfg(feature = "arbitrary")]
11263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11264        use arbitrary::{Arbitrary, Unstructured};
11265        let mut buf = [0u8; 1024];
11266        rng.fill_bytes(&mut buf);
11267        let mut unstructured = Unstructured::new(&buf);
11268        Self::arbitrary(&mut unstructured).unwrap_or_default()
11269    }
11270}
11271impl Default for DISTANCE_SENSOR_DATA {
11272    fn default() -> Self {
11273        Self::DEFAULT.clone()
11274    }
11275}
11276impl MessageData for DISTANCE_SENSOR_DATA {
11277    type Message = MavMessage;
11278    const ID: u32 = 132u32;
11279    const NAME: &'static str = "DISTANCE_SENSOR";
11280    const EXTRA_CRC: u8 = 85u8;
11281    const ENCODED_LEN: usize = 39usize;
11282    fn deser(
11283        _version: MavlinkVersion,
11284        __input: &[u8],
11285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11286        let avail_len = __input.len();
11287        let mut payload_buf = [0; Self::ENCODED_LEN];
11288        let mut buf = if avail_len < Self::ENCODED_LEN {
11289            payload_buf[0..avail_len].copy_from_slice(__input);
11290            Bytes::new(&payload_buf)
11291        } else {
11292            Bytes::new(__input)
11293        };
11294        let mut __struct = Self::default();
11295        __struct.time_boot_ms = buf.get_u32_le();
11296        __struct.min_distance = buf.get_u16_le();
11297        __struct.max_distance = buf.get_u16_le();
11298        __struct.current_distance = buf.get_u16_le();
11299        let tmp = buf.get_u8();
11300        __struct.mavtype =
11301            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11302                enum_type: "MavDistanceSensor",
11303                value: tmp as u32,
11304            })?;
11305        __struct.id = buf.get_u8();
11306        let tmp = buf.get_u8();
11307        __struct.orientation =
11308            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11309                enum_type: "MavSensorOrientation",
11310                value: tmp as u32,
11311            })?;
11312        __struct.covariance = buf.get_u8();
11313        __struct.horizontal_fov = buf.get_f32_le();
11314        __struct.vertical_fov = buf.get_f32_le();
11315        for v in &mut __struct.quaternion {
11316            let val = buf.get_f32_le();
11317            *v = val;
11318        }
11319        __struct.signal_quality = buf.get_u8();
11320        Ok(__struct)
11321    }
11322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11323        let mut __tmp = BytesMut::new(bytes);
11324        #[allow(clippy::absurd_extreme_comparisons)]
11325        #[allow(unused_comparisons)]
11326        if __tmp.remaining() < Self::ENCODED_LEN {
11327            panic!(
11328                "buffer is too small (need {} bytes, but got {})",
11329                Self::ENCODED_LEN,
11330                __tmp.remaining(),
11331            )
11332        }
11333        __tmp.put_u32_le(self.time_boot_ms);
11334        __tmp.put_u16_le(self.min_distance);
11335        __tmp.put_u16_le(self.max_distance);
11336        __tmp.put_u16_le(self.current_distance);
11337        __tmp.put_u8(self.mavtype as u8);
11338        __tmp.put_u8(self.id);
11339        __tmp.put_u8(self.orientation as u8);
11340        __tmp.put_u8(self.covariance);
11341        if matches!(version, MavlinkVersion::V2) {
11342            __tmp.put_f32_le(self.horizontal_fov);
11343            __tmp.put_f32_le(self.vertical_fov);
11344            for val in &self.quaternion {
11345                __tmp.put_f32_le(*val);
11346            }
11347            __tmp.put_u8(self.signal_quality);
11348            let len = __tmp.len();
11349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11350        } else {
11351            __tmp.len()
11352        }
11353    }
11354}
11355#[doc = "EFI status output."]
11356#[doc = ""]
11357#[doc = "ID: 225"]
11358#[derive(Debug, Clone, PartialEq)]
11359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11361#[cfg_attr(feature = "ts", derive(TS))]
11362#[cfg_attr(feature = "ts", ts(export))]
11363pub struct EFI_STATUS_DATA {
11364    #[doc = "ECU index"]
11365    pub ecu_index: f32,
11366    #[doc = "RPM"]
11367    pub rpm: f32,
11368    #[doc = "Fuel consumed"]
11369    pub fuel_consumed: f32,
11370    #[doc = "Fuel flow rate"]
11371    pub fuel_flow: f32,
11372    #[doc = "Engine load"]
11373    pub engine_load: f32,
11374    #[doc = "Throttle position"]
11375    pub throttle_position: f32,
11376    #[doc = "Spark dwell time"]
11377    pub spark_dwell_time: f32,
11378    #[doc = "Barometric pressure"]
11379    pub barometric_pressure: f32,
11380    #[doc = "Intake manifold pressure("]
11381    pub intake_manifold_pressure: f32,
11382    #[doc = "Intake manifold temperature"]
11383    pub intake_manifold_temperature: f32,
11384    #[doc = "Cylinder head temperature"]
11385    pub cylinder_head_temperature: f32,
11386    #[doc = "Ignition timing (Crank angle degrees)"]
11387    pub ignition_timing: f32,
11388    #[doc = "Injection time"]
11389    pub injection_time: f32,
11390    #[doc = "Exhaust gas temperature"]
11391    pub exhaust_gas_temperature: f32,
11392    #[doc = "Output throttle"]
11393    pub throttle_out: f32,
11394    #[doc = "Pressure/temperature compensation"]
11395    pub pt_compensation: f32,
11396    #[doc = "EFI health status"]
11397    pub health: u8,
11398    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11399    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11400    pub ignition_voltage: f32,
11401    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11403    pub fuel_pressure: f32,
11404}
11405impl EFI_STATUS_DATA {
11406    pub const ENCODED_LEN: usize = 73usize;
11407    pub const DEFAULT: Self = Self {
11408        ecu_index: 0.0_f32,
11409        rpm: 0.0_f32,
11410        fuel_consumed: 0.0_f32,
11411        fuel_flow: 0.0_f32,
11412        engine_load: 0.0_f32,
11413        throttle_position: 0.0_f32,
11414        spark_dwell_time: 0.0_f32,
11415        barometric_pressure: 0.0_f32,
11416        intake_manifold_pressure: 0.0_f32,
11417        intake_manifold_temperature: 0.0_f32,
11418        cylinder_head_temperature: 0.0_f32,
11419        ignition_timing: 0.0_f32,
11420        injection_time: 0.0_f32,
11421        exhaust_gas_temperature: 0.0_f32,
11422        throttle_out: 0.0_f32,
11423        pt_compensation: 0.0_f32,
11424        health: 0_u8,
11425        ignition_voltage: 0.0_f32,
11426        fuel_pressure: 0.0_f32,
11427    };
11428    #[cfg(feature = "arbitrary")]
11429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11430        use arbitrary::{Arbitrary, Unstructured};
11431        let mut buf = [0u8; 1024];
11432        rng.fill_bytes(&mut buf);
11433        let mut unstructured = Unstructured::new(&buf);
11434        Self::arbitrary(&mut unstructured).unwrap_or_default()
11435    }
11436}
11437impl Default for EFI_STATUS_DATA {
11438    fn default() -> Self {
11439        Self::DEFAULT.clone()
11440    }
11441}
11442impl MessageData for EFI_STATUS_DATA {
11443    type Message = MavMessage;
11444    const ID: u32 = 225u32;
11445    const NAME: &'static str = "EFI_STATUS";
11446    const EXTRA_CRC: u8 = 208u8;
11447    const ENCODED_LEN: usize = 73usize;
11448    fn deser(
11449        _version: MavlinkVersion,
11450        __input: &[u8],
11451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11452        let avail_len = __input.len();
11453        let mut payload_buf = [0; Self::ENCODED_LEN];
11454        let mut buf = if avail_len < Self::ENCODED_LEN {
11455            payload_buf[0..avail_len].copy_from_slice(__input);
11456            Bytes::new(&payload_buf)
11457        } else {
11458            Bytes::new(__input)
11459        };
11460        let mut __struct = Self::default();
11461        __struct.ecu_index = buf.get_f32_le();
11462        __struct.rpm = buf.get_f32_le();
11463        __struct.fuel_consumed = buf.get_f32_le();
11464        __struct.fuel_flow = buf.get_f32_le();
11465        __struct.engine_load = buf.get_f32_le();
11466        __struct.throttle_position = buf.get_f32_le();
11467        __struct.spark_dwell_time = buf.get_f32_le();
11468        __struct.barometric_pressure = buf.get_f32_le();
11469        __struct.intake_manifold_pressure = buf.get_f32_le();
11470        __struct.intake_manifold_temperature = buf.get_f32_le();
11471        __struct.cylinder_head_temperature = buf.get_f32_le();
11472        __struct.ignition_timing = buf.get_f32_le();
11473        __struct.injection_time = buf.get_f32_le();
11474        __struct.exhaust_gas_temperature = buf.get_f32_le();
11475        __struct.throttle_out = buf.get_f32_le();
11476        __struct.pt_compensation = buf.get_f32_le();
11477        __struct.health = buf.get_u8();
11478        __struct.ignition_voltage = buf.get_f32_le();
11479        __struct.fuel_pressure = buf.get_f32_le();
11480        Ok(__struct)
11481    }
11482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11483        let mut __tmp = BytesMut::new(bytes);
11484        #[allow(clippy::absurd_extreme_comparisons)]
11485        #[allow(unused_comparisons)]
11486        if __tmp.remaining() < Self::ENCODED_LEN {
11487            panic!(
11488                "buffer is too small (need {} bytes, but got {})",
11489                Self::ENCODED_LEN,
11490                __tmp.remaining(),
11491            )
11492        }
11493        __tmp.put_f32_le(self.ecu_index);
11494        __tmp.put_f32_le(self.rpm);
11495        __tmp.put_f32_le(self.fuel_consumed);
11496        __tmp.put_f32_le(self.fuel_flow);
11497        __tmp.put_f32_le(self.engine_load);
11498        __tmp.put_f32_le(self.throttle_position);
11499        __tmp.put_f32_le(self.spark_dwell_time);
11500        __tmp.put_f32_le(self.barometric_pressure);
11501        __tmp.put_f32_le(self.intake_manifold_pressure);
11502        __tmp.put_f32_le(self.intake_manifold_temperature);
11503        __tmp.put_f32_le(self.cylinder_head_temperature);
11504        __tmp.put_f32_le(self.ignition_timing);
11505        __tmp.put_f32_le(self.injection_time);
11506        __tmp.put_f32_le(self.exhaust_gas_temperature);
11507        __tmp.put_f32_le(self.throttle_out);
11508        __tmp.put_f32_le(self.pt_compensation);
11509        __tmp.put_u8(self.health);
11510        if matches!(version, MavlinkVersion::V2) {
11511            __tmp.put_f32_le(self.ignition_voltage);
11512            __tmp.put_f32_le(self.fuel_pressure);
11513            let len = __tmp.len();
11514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11515        } else {
11516            __tmp.len()
11517        }
11518    }
11519}
11520#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11521#[doc = ""]
11522#[doc = "ID: 131"]
11523#[derive(Debug, Clone, PartialEq)]
11524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11526#[cfg_attr(feature = "ts", derive(TS))]
11527#[cfg_attr(feature = "ts", ts(export))]
11528pub struct ENCAPSULATED_DATA_DATA {
11529    #[doc = "sequence number (starting with 0 on every transmission)"]
11530    pub seqnr: u16,
11531    #[doc = "image data bytes"]
11532    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11533    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11534    pub data: [u8; 253],
11535}
11536impl ENCAPSULATED_DATA_DATA {
11537    pub const ENCODED_LEN: usize = 255usize;
11538    pub const DEFAULT: Self = Self {
11539        seqnr: 0_u16,
11540        data: [0_u8; 253usize],
11541    };
11542    #[cfg(feature = "arbitrary")]
11543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11544        use arbitrary::{Arbitrary, Unstructured};
11545        let mut buf = [0u8; 1024];
11546        rng.fill_bytes(&mut buf);
11547        let mut unstructured = Unstructured::new(&buf);
11548        Self::arbitrary(&mut unstructured).unwrap_or_default()
11549    }
11550}
11551impl Default for ENCAPSULATED_DATA_DATA {
11552    fn default() -> Self {
11553        Self::DEFAULT.clone()
11554    }
11555}
11556impl MessageData for ENCAPSULATED_DATA_DATA {
11557    type Message = MavMessage;
11558    const ID: u32 = 131u32;
11559    const NAME: &'static str = "ENCAPSULATED_DATA";
11560    const EXTRA_CRC: u8 = 223u8;
11561    const ENCODED_LEN: usize = 255usize;
11562    fn deser(
11563        _version: MavlinkVersion,
11564        __input: &[u8],
11565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11566        let avail_len = __input.len();
11567        let mut payload_buf = [0; Self::ENCODED_LEN];
11568        let mut buf = if avail_len < Self::ENCODED_LEN {
11569            payload_buf[0..avail_len].copy_from_slice(__input);
11570            Bytes::new(&payload_buf)
11571        } else {
11572            Bytes::new(__input)
11573        };
11574        let mut __struct = Self::default();
11575        __struct.seqnr = buf.get_u16_le();
11576        for v in &mut __struct.data {
11577            let val = buf.get_u8();
11578            *v = val;
11579        }
11580        Ok(__struct)
11581    }
11582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11583        let mut __tmp = BytesMut::new(bytes);
11584        #[allow(clippy::absurd_extreme_comparisons)]
11585        #[allow(unused_comparisons)]
11586        if __tmp.remaining() < Self::ENCODED_LEN {
11587            panic!(
11588                "buffer is too small (need {} bytes, but got {})",
11589                Self::ENCODED_LEN,
11590                __tmp.remaining(),
11591            )
11592        }
11593        __tmp.put_u16_le(self.seqnr);
11594        for val in &self.data {
11595            __tmp.put_u8(*val);
11596        }
11597        if matches!(version, MavlinkVersion::V2) {
11598            let len = __tmp.len();
11599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11600        } else {
11601            __tmp.len()
11602        }
11603    }
11604}
11605#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11606#[doc = ""]
11607#[doc = "ID: 290"]
11608#[derive(Debug, Clone, PartialEq)]
11609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11611#[cfg_attr(feature = "ts", derive(TS))]
11612#[cfg_attr(feature = "ts", ts(export))]
11613pub struct ESC_INFO_DATA {
11614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11615    pub time_usec: u64,
11616    #[doc = "Number of reported errors by each ESC since boot."]
11617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11619    pub error_count: [u32; 4],
11620    #[doc = "Counter of data packets received."]
11621    pub counter: u16,
11622    #[doc = "Bitmap of ESC failure flags."]
11623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11625    pub failure_flags: [u16; 4],
11626    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11628    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11629    pub temperature: [i16; 4],
11630    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11631    pub index: u8,
11632    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11633    pub count: u8,
11634    #[doc = "Connection type protocol for all ESC."]
11635    pub connection_type: EscConnectionType,
11636    #[doc = "Information regarding online/offline status of each ESC."]
11637    pub info: u8,
11638}
11639impl ESC_INFO_DATA {
11640    pub const ENCODED_LEN: usize = 46usize;
11641    pub const DEFAULT: Self = Self {
11642        time_usec: 0_u64,
11643        error_count: [0_u32; 4usize],
11644        counter: 0_u16,
11645        failure_flags: [0_u16; 4usize],
11646        temperature: [0_i16; 4usize],
11647        index: 0_u8,
11648        count: 0_u8,
11649        connection_type: EscConnectionType::DEFAULT,
11650        info: 0_u8,
11651    };
11652    #[cfg(feature = "arbitrary")]
11653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11654        use arbitrary::{Arbitrary, Unstructured};
11655        let mut buf = [0u8; 1024];
11656        rng.fill_bytes(&mut buf);
11657        let mut unstructured = Unstructured::new(&buf);
11658        Self::arbitrary(&mut unstructured).unwrap_or_default()
11659    }
11660}
11661impl Default for ESC_INFO_DATA {
11662    fn default() -> Self {
11663        Self::DEFAULT.clone()
11664    }
11665}
11666impl MessageData for ESC_INFO_DATA {
11667    type Message = MavMessage;
11668    const ID: u32 = 290u32;
11669    const NAME: &'static str = "ESC_INFO";
11670    const EXTRA_CRC: u8 = 251u8;
11671    const ENCODED_LEN: usize = 46usize;
11672    fn deser(
11673        _version: MavlinkVersion,
11674        __input: &[u8],
11675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11676        let avail_len = __input.len();
11677        let mut payload_buf = [0; Self::ENCODED_LEN];
11678        let mut buf = if avail_len < Self::ENCODED_LEN {
11679            payload_buf[0..avail_len].copy_from_slice(__input);
11680            Bytes::new(&payload_buf)
11681        } else {
11682            Bytes::new(__input)
11683        };
11684        let mut __struct = Self::default();
11685        __struct.time_usec = buf.get_u64_le();
11686        for v in &mut __struct.error_count {
11687            let val = buf.get_u32_le();
11688            *v = val;
11689        }
11690        __struct.counter = buf.get_u16_le();
11691        for v in &mut __struct.failure_flags {
11692            let val = buf.get_u16_le();
11693            *v = val;
11694        }
11695        for v in &mut __struct.temperature {
11696            let val = buf.get_i16_le();
11697            *v = val;
11698        }
11699        __struct.index = buf.get_u8();
11700        __struct.count = buf.get_u8();
11701        let tmp = buf.get_u8();
11702        __struct.connection_type =
11703            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11704                enum_type: "EscConnectionType",
11705                value: tmp as u32,
11706            })?;
11707        __struct.info = buf.get_u8();
11708        Ok(__struct)
11709    }
11710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11711        let mut __tmp = BytesMut::new(bytes);
11712        #[allow(clippy::absurd_extreme_comparisons)]
11713        #[allow(unused_comparisons)]
11714        if __tmp.remaining() < Self::ENCODED_LEN {
11715            panic!(
11716                "buffer is too small (need {} bytes, but got {})",
11717                Self::ENCODED_LEN,
11718                __tmp.remaining(),
11719            )
11720        }
11721        __tmp.put_u64_le(self.time_usec);
11722        for val in &self.error_count {
11723            __tmp.put_u32_le(*val);
11724        }
11725        __tmp.put_u16_le(self.counter);
11726        for val in &self.failure_flags {
11727            __tmp.put_u16_le(*val);
11728        }
11729        for val in &self.temperature {
11730            __tmp.put_i16_le(*val);
11731        }
11732        __tmp.put_u8(self.index);
11733        __tmp.put_u8(self.count);
11734        __tmp.put_u8(self.connection_type as u8);
11735        __tmp.put_u8(self.info);
11736        if matches!(version, MavlinkVersion::V2) {
11737            let len = __tmp.len();
11738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11739        } else {
11740            __tmp.len()
11741        }
11742    }
11743}
11744#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11745#[doc = ""]
11746#[doc = "ID: 291"]
11747#[derive(Debug, Clone, PartialEq)]
11748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11750#[cfg_attr(feature = "ts", derive(TS))]
11751#[cfg_attr(feature = "ts", ts(export))]
11752pub struct ESC_STATUS_DATA {
11753    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11754    pub time_usec: u64,
11755    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11756    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11757    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11758    pub rpm: [i32; 4],
11759    #[doc = "Voltage measured from each ESC."]
11760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11761    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11762    pub voltage: [f32; 4],
11763    #[doc = "Current measured from each ESC."]
11764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11765    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11766    pub current: [f32; 4],
11767    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11768    pub index: u8,
11769}
11770impl ESC_STATUS_DATA {
11771    pub const ENCODED_LEN: usize = 57usize;
11772    pub const DEFAULT: Self = Self {
11773        time_usec: 0_u64,
11774        rpm: [0_i32; 4usize],
11775        voltage: [0.0_f32; 4usize],
11776        current: [0.0_f32; 4usize],
11777        index: 0_u8,
11778    };
11779    #[cfg(feature = "arbitrary")]
11780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11781        use arbitrary::{Arbitrary, Unstructured};
11782        let mut buf = [0u8; 1024];
11783        rng.fill_bytes(&mut buf);
11784        let mut unstructured = Unstructured::new(&buf);
11785        Self::arbitrary(&mut unstructured).unwrap_or_default()
11786    }
11787}
11788impl Default for ESC_STATUS_DATA {
11789    fn default() -> Self {
11790        Self::DEFAULT.clone()
11791    }
11792}
11793impl MessageData for ESC_STATUS_DATA {
11794    type Message = MavMessage;
11795    const ID: u32 = 291u32;
11796    const NAME: &'static str = "ESC_STATUS";
11797    const EXTRA_CRC: u8 = 10u8;
11798    const ENCODED_LEN: usize = 57usize;
11799    fn deser(
11800        _version: MavlinkVersion,
11801        __input: &[u8],
11802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11803        let avail_len = __input.len();
11804        let mut payload_buf = [0; Self::ENCODED_LEN];
11805        let mut buf = if avail_len < Self::ENCODED_LEN {
11806            payload_buf[0..avail_len].copy_from_slice(__input);
11807            Bytes::new(&payload_buf)
11808        } else {
11809            Bytes::new(__input)
11810        };
11811        let mut __struct = Self::default();
11812        __struct.time_usec = buf.get_u64_le();
11813        for v in &mut __struct.rpm {
11814            let val = buf.get_i32_le();
11815            *v = val;
11816        }
11817        for v in &mut __struct.voltage {
11818            let val = buf.get_f32_le();
11819            *v = val;
11820        }
11821        for v in &mut __struct.current {
11822            let val = buf.get_f32_le();
11823            *v = val;
11824        }
11825        __struct.index = buf.get_u8();
11826        Ok(__struct)
11827    }
11828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11829        let mut __tmp = BytesMut::new(bytes);
11830        #[allow(clippy::absurd_extreme_comparisons)]
11831        #[allow(unused_comparisons)]
11832        if __tmp.remaining() < Self::ENCODED_LEN {
11833            panic!(
11834                "buffer is too small (need {} bytes, but got {})",
11835                Self::ENCODED_LEN,
11836                __tmp.remaining(),
11837            )
11838        }
11839        __tmp.put_u64_le(self.time_usec);
11840        for val in &self.rpm {
11841            __tmp.put_i32_le(*val);
11842        }
11843        for val in &self.voltage {
11844            __tmp.put_f32_le(*val);
11845        }
11846        for val in &self.current {
11847            __tmp.put_f32_le(*val);
11848        }
11849        __tmp.put_u8(self.index);
11850        if matches!(version, MavlinkVersion::V2) {
11851            let len = __tmp.len();
11852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11853        } else {
11854            __tmp.len()
11855        }
11856    }
11857}
11858#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11859#[doc = ""]
11860#[doc = "ID: 230"]
11861#[derive(Debug, Clone, PartialEq)]
11862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11864#[cfg_attr(feature = "ts", derive(TS))]
11865#[cfg_attr(feature = "ts", ts(export))]
11866pub struct ESTIMATOR_STATUS_DATA {
11867    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11868    pub time_usec: u64,
11869    #[doc = "Velocity innovation test ratio"]
11870    pub vel_ratio: f32,
11871    #[doc = "Horizontal position innovation test ratio"]
11872    pub pos_horiz_ratio: f32,
11873    #[doc = "Vertical position innovation test ratio"]
11874    pub pos_vert_ratio: f32,
11875    #[doc = "Magnetometer innovation test ratio"]
11876    pub mag_ratio: f32,
11877    #[doc = "Height above terrain innovation test ratio"]
11878    pub hagl_ratio: f32,
11879    #[doc = "True airspeed innovation test ratio"]
11880    pub tas_ratio: f32,
11881    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11882    pub pos_horiz_accuracy: f32,
11883    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11884    pub pos_vert_accuracy: f32,
11885    #[doc = "Bitmap indicating which EKF outputs are valid."]
11886    pub flags: EstimatorStatusFlags,
11887}
11888impl ESTIMATOR_STATUS_DATA {
11889    pub const ENCODED_LEN: usize = 42usize;
11890    pub const DEFAULT: Self = Self {
11891        time_usec: 0_u64,
11892        vel_ratio: 0.0_f32,
11893        pos_horiz_ratio: 0.0_f32,
11894        pos_vert_ratio: 0.0_f32,
11895        mag_ratio: 0.0_f32,
11896        hagl_ratio: 0.0_f32,
11897        tas_ratio: 0.0_f32,
11898        pos_horiz_accuracy: 0.0_f32,
11899        pos_vert_accuracy: 0.0_f32,
11900        flags: EstimatorStatusFlags::DEFAULT,
11901    };
11902    #[cfg(feature = "arbitrary")]
11903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11904        use arbitrary::{Arbitrary, Unstructured};
11905        let mut buf = [0u8; 1024];
11906        rng.fill_bytes(&mut buf);
11907        let mut unstructured = Unstructured::new(&buf);
11908        Self::arbitrary(&mut unstructured).unwrap_or_default()
11909    }
11910}
11911impl Default for ESTIMATOR_STATUS_DATA {
11912    fn default() -> Self {
11913        Self::DEFAULT.clone()
11914    }
11915}
11916impl MessageData for ESTIMATOR_STATUS_DATA {
11917    type Message = MavMessage;
11918    const ID: u32 = 230u32;
11919    const NAME: &'static str = "ESTIMATOR_STATUS";
11920    const EXTRA_CRC: u8 = 163u8;
11921    const ENCODED_LEN: usize = 42usize;
11922    fn deser(
11923        _version: MavlinkVersion,
11924        __input: &[u8],
11925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11926        let avail_len = __input.len();
11927        let mut payload_buf = [0; Self::ENCODED_LEN];
11928        let mut buf = if avail_len < Self::ENCODED_LEN {
11929            payload_buf[0..avail_len].copy_from_slice(__input);
11930            Bytes::new(&payload_buf)
11931        } else {
11932            Bytes::new(__input)
11933        };
11934        let mut __struct = Self::default();
11935        __struct.time_usec = buf.get_u64_le();
11936        __struct.vel_ratio = buf.get_f32_le();
11937        __struct.pos_horiz_ratio = buf.get_f32_le();
11938        __struct.pos_vert_ratio = buf.get_f32_le();
11939        __struct.mag_ratio = buf.get_f32_le();
11940        __struct.hagl_ratio = buf.get_f32_le();
11941        __struct.tas_ratio = buf.get_f32_le();
11942        __struct.pos_horiz_accuracy = buf.get_f32_le();
11943        __struct.pos_vert_accuracy = buf.get_f32_le();
11944        let tmp = buf.get_u16_le();
11945        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11946            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11947                flag_type: "EstimatorStatusFlags",
11948                value: tmp as u32,
11949            })?;
11950        Ok(__struct)
11951    }
11952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11953        let mut __tmp = BytesMut::new(bytes);
11954        #[allow(clippy::absurd_extreme_comparisons)]
11955        #[allow(unused_comparisons)]
11956        if __tmp.remaining() < Self::ENCODED_LEN {
11957            panic!(
11958                "buffer is too small (need {} bytes, but got {})",
11959                Self::ENCODED_LEN,
11960                __tmp.remaining(),
11961            )
11962        }
11963        __tmp.put_u64_le(self.time_usec);
11964        __tmp.put_f32_le(self.vel_ratio);
11965        __tmp.put_f32_le(self.pos_horiz_ratio);
11966        __tmp.put_f32_le(self.pos_vert_ratio);
11967        __tmp.put_f32_le(self.mag_ratio);
11968        __tmp.put_f32_le(self.hagl_ratio);
11969        __tmp.put_f32_le(self.tas_ratio);
11970        __tmp.put_f32_le(self.pos_horiz_accuracy);
11971        __tmp.put_f32_le(self.pos_vert_accuracy);
11972        __tmp.put_u16_le(self.flags.bits());
11973        if matches!(version, MavlinkVersion::V2) {
11974            let len = __tmp.len();
11975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11976        } else {
11977            __tmp.len()
11978        }
11979    }
11980}
11981#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11982#[doc = ""]
11983#[doc = "ID: 410"]
11984#[derive(Debug, Clone, PartialEq)]
11985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11987#[cfg_attr(feature = "ts", derive(TS))]
11988#[cfg_attr(feature = "ts", ts(export))]
11989pub struct EVENT_DATA {
11990    #[doc = "Event ID (as defined in the component metadata)"]
11991    pub id: u32,
11992    #[doc = "Timestamp (time since system boot when the event happened)."]
11993    pub event_time_boot_ms: u32,
11994    #[doc = "Sequence number."]
11995    pub sequence: u16,
11996    #[doc = "Component ID"]
11997    pub destination_component: u8,
11998    #[doc = "System ID"]
11999    pub destination_system: u8,
12000    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12001    pub log_levels: u8,
12002    #[doc = "Arguments (depend on event ID)."]
12003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12004    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12005    pub arguments: [u8; 40],
12006}
12007impl EVENT_DATA {
12008    pub const ENCODED_LEN: usize = 53usize;
12009    pub const DEFAULT: Self = Self {
12010        id: 0_u32,
12011        event_time_boot_ms: 0_u32,
12012        sequence: 0_u16,
12013        destination_component: 0_u8,
12014        destination_system: 0_u8,
12015        log_levels: 0_u8,
12016        arguments: [0_u8; 40usize],
12017    };
12018    #[cfg(feature = "arbitrary")]
12019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12020        use arbitrary::{Arbitrary, Unstructured};
12021        let mut buf = [0u8; 1024];
12022        rng.fill_bytes(&mut buf);
12023        let mut unstructured = Unstructured::new(&buf);
12024        Self::arbitrary(&mut unstructured).unwrap_or_default()
12025    }
12026}
12027impl Default for EVENT_DATA {
12028    fn default() -> Self {
12029        Self::DEFAULT.clone()
12030    }
12031}
12032impl MessageData for EVENT_DATA {
12033    type Message = MavMessage;
12034    const ID: u32 = 410u32;
12035    const NAME: &'static str = "EVENT";
12036    const EXTRA_CRC: u8 = 160u8;
12037    const ENCODED_LEN: usize = 53usize;
12038    fn deser(
12039        _version: MavlinkVersion,
12040        __input: &[u8],
12041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12042        let avail_len = __input.len();
12043        let mut payload_buf = [0; Self::ENCODED_LEN];
12044        let mut buf = if avail_len < Self::ENCODED_LEN {
12045            payload_buf[0..avail_len].copy_from_slice(__input);
12046            Bytes::new(&payload_buf)
12047        } else {
12048            Bytes::new(__input)
12049        };
12050        let mut __struct = Self::default();
12051        __struct.id = buf.get_u32_le();
12052        __struct.event_time_boot_ms = buf.get_u32_le();
12053        __struct.sequence = buf.get_u16_le();
12054        __struct.destination_component = buf.get_u8();
12055        __struct.destination_system = buf.get_u8();
12056        __struct.log_levels = buf.get_u8();
12057        for v in &mut __struct.arguments {
12058            let val = buf.get_u8();
12059            *v = val;
12060        }
12061        Ok(__struct)
12062    }
12063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12064        let mut __tmp = BytesMut::new(bytes);
12065        #[allow(clippy::absurd_extreme_comparisons)]
12066        #[allow(unused_comparisons)]
12067        if __tmp.remaining() < Self::ENCODED_LEN {
12068            panic!(
12069                "buffer is too small (need {} bytes, but got {})",
12070                Self::ENCODED_LEN,
12071                __tmp.remaining(),
12072            )
12073        }
12074        __tmp.put_u32_le(self.id);
12075        __tmp.put_u32_le(self.event_time_boot_ms);
12076        __tmp.put_u16_le(self.sequence);
12077        __tmp.put_u8(self.destination_component);
12078        __tmp.put_u8(self.destination_system);
12079        __tmp.put_u8(self.log_levels);
12080        for val in &self.arguments {
12081            __tmp.put_u8(*val);
12082        }
12083        if matches!(version, MavlinkVersion::V2) {
12084            let len = __tmp.len();
12085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12086        } else {
12087            __tmp.len()
12088        }
12089    }
12090}
12091#[doc = "Provides state for additional features."]
12092#[doc = ""]
12093#[doc = "ID: 245"]
12094#[derive(Debug, Clone, PartialEq)]
12095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12097#[cfg_attr(feature = "ts", derive(TS))]
12098#[cfg_attr(feature = "ts", ts(export))]
12099pub struct EXTENDED_SYS_STATE_DATA {
12100    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12101    pub vtol_state: MavVtolState,
12102    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12103    pub landed_state: MavLandedState,
12104}
12105impl EXTENDED_SYS_STATE_DATA {
12106    pub const ENCODED_LEN: usize = 2usize;
12107    pub const DEFAULT: Self = Self {
12108        vtol_state: MavVtolState::DEFAULT,
12109        landed_state: MavLandedState::DEFAULT,
12110    };
12111    #[cfg(feature = "arbitrary")]
12112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12113        use arbitrary::{Arbitrary, Unstructured};
12114        let mut buf = [0u8; 1024];
12115        rng.fill_bytes(&mut buf);
12116        let mut unstructured = Unstructured::new(&buf);
12117        Self::arbitrary(&mut unstructured).unwrap_or_default()
12118    }
12119}
12120impl Default for EXTENDED_SYS_STATE_DATA {
12121    fn default() -> Self {
12122        Self::DEFAULT.clone()
12123    }
12124}
12125impl MessageData for EXTENDED_SYS_STATE_DATA {
12126    type Message = MavMessage;
12127    const ID: u32 = 245u32;
12128    const NAME: &'static str = "EXTENDED_SYS_STATE";
12129    const EXTRA_CRC: u8 = 130u8;
12130    const ENCODED_LEN: usize = 2usize;
12131    fn deser(
12132        _version: MavlinkVersion,
12133        __input: &[u8],
12134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12135        let avail_len = __input.len();
12136        let mut payload_buf = [0; Self::ENCODED_LEN];
12137        let mut buf = if avail_len < Self::ENCODED_LEN {
12138            payload_buf[0..avail_len].copy_from_slice(__input);
12139            Bytes::new(&payload_buf)
12140        } else {
12141            Bytes::new(__input)
12142        };
12143        let mut __struct = Self::default();
12144        let tmp = buf.get_u8();
12145        __struct.vtol_state =
12146            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12147                enum_type: "MavVtolState",
12148                value: tmp as u32,
12149            })?;
12150        let tmp = buf.get_u8();
12151        __struct.landed_state =
12152            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12153                enum_type: "MavLandedState",
12154                value: tmp as u32,
12155            })?;
12156        Ok(__struct)
12157    }
12158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12159        let mut __tmp = BytesMut::new(bytes);
12160        #[allow(clippy::absurd_extreme_comparisons)]
12161        #[allow(unused_comparisons)]
12162        if __tmp.remaining() < Self::ENCODED_LEN {
12163            panic!(
12164                "buffer is too small (need {} bytes, but got {})",
12165                Self::ENCODED_LEN,
12166                __tmp.remaining(),
12167            )
12168        }
12169        __tmp.put_u8(self.vtol_state as u8);
12170        __tmp.put_u8(self.landed_state as u8);
12171        if matches!(version, MavlinkVersion::V2) {
12172            let len = __tmp.len();
12173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12174        } else {
12175            __tmp.len()
12176        }
12177    }
12178}
12179#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12180#[doc = ""]
12181#[doc = "ID: 162"]
12182#[derive(Debug, Clone, PartialEq)]
12183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12185#[cfg_attr(feature = "ts", derive(TS))]
12186#[cfg_attr(feature = "ts", ts(export))]
12187pub struct FENCE_STATUS_DATA {
12188    #[doc = "Time (since boot) of last breach."]
12189    pub breach_time: u32,
12190    #[doc = "Number of fence breaches."]
12191    pub breach_count: u16,
12192    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12193    pub breach_status: u8,
12194    #[doc = "Last breach type."]
12195    pub breach_type: FenceBreach,
12196    #[doc = "Active action to prevent fence breach"]
12197    #[cfg_attr(feature = "serde", serde(default))]
12198    pub breach_mitigation: FenceMitigate,
12199}
12200impl FENCE_STATUS_DATA {
12201    pub const ENCODED_LEN: usize = 9usize;
12202    pub const DEFAULT: Self = Self {
12203        breach_time: 0_u32,
12204        breach_count: 0_u16,
12205        breach_status: 0_u8,
12206        breach_type: FenceBreach::DEFAULT,
12207        breach_mitigation: FenceMitigate::DEFAULT,
12208    };
12209    #[cfg(feature = "arbitrary")]
12210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12211        use arbitrary::{Arbitrary, Unstructured};
12212        let mut buf = [0u8; 1024];
12213        rng.fill_bytes(&mut buf);
12214        let mut unstructured = Unstructured::new(&buf);
12215        Self::arbitrary(&mut unstructured).unwrap_or_default()
12216    }
12217}
12218impl Default for FENCE_STATUS_DATA {
12219    fn default() -> Self {
12220        Self::DEFAULT.clone()
12221    }
12222}
12223impl MessageData for FENCE_STATUS_DATA {
12224    type Message = MavMessage;
12225    const ID: u32 = 162u32;
12226    const NAME: &'static str = "FENCE_STATUS";
12227    const EXTRA_CRC: u8 = 189u8;
12228    const ENCODED_LEN: usize = 9usize;
12229    fn deser(
12230        _version: MavlinkVersion,
12231        __input: &[u8],
12232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12233        let avail_len = __input.len();
12234        let mut payload_buf = [0; Self::ENCODED_LEN];
12235        let mut buf = if avail_len < Self::ENCODED_LEN {
12236            payload_buf[0..avail_len].copy_from_slice(__input);
12237            Bytes::new(&payload_buf)
12238        } else {
12239            Bytes::new(__input)
12240        };
12241        let mut __struct = Self::default();
12242        __struct.breach_time = buf.get_u32_le();
12243        __struct.breach_count = buf.get_u16_le();
12244        __struct.breach_status = buf.get_u8();
12245        let tmp = buf.get_u8();
12246        __struct.breach_type =
12247            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12248                enum_type: "FenceBreach",
12249                value: tmp as u32,
12250            })?;
12251        let tmp = buf.get_u8();
12252        __struct.breach_mitigation =
12253            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12254                enum_type: "FenceMitigate",
12255                value: tmp as u32,
12256            })?;
12257        Ok(__struct)
12258    }
12259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12260        let mut __tmp = BytesMut::new(bytes);
12261        #[allow(clippy::absurd_extreme_comparisons)]
12262        #[allow(unused_comparisons)]
12263        if __tmp.remaining() < Self::ENCODED_LEN {
12264            panic!(
12265                "buffer is too small (need {} bytes, but got {})",
12266                Self::ENCODED_LEN,
12267                __tmp.remaining(),
12268            )
12269        }
12270        __tmp.put_u32_le(self.breach_time);
12271        __tmp.put_u16_le(self.breach_count);
12272        __tmp.put_u8(self.breach_status);
12273        __tmp.put_u8(self.breach_type as u8);
12274        if matches!(version, MavlinkVersion::V2) {
12275            __tmp.put_u8(self.breach_mitigation as u8);
12276            let len = __tmp.len();
12277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12278        } else {
12279            __tmp.len()
12280        }
12281    }
12282}
12283#[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
12284#[doc = ""]
12285#[doc = "ID: 361"]
12286#[derive(Debug, Clone, PartialEq)]
12287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12289#[cfg_attr(feature = "ts", derive(TS))]
12290#[cfg_attr(feature = "ts", ts(export))]
12291pub struct FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12292    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12293    pub time_usec: u64,
12294    #[doc = "Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise."]
12295    pub major_radius: f32,
12296    #[doc = "Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure."]
12297    pub minor_radius: f32,
12298    #[doc = "Orientation of the figure eight major axis with respect to true north in [-pi,pi)."]
12299    pub orientation: f32,
12300    #[doc = "X coordinate of center point. Coordinate system depends on frame field."]
12301    pub x: i32,
12302    #[doc = "Y coordinate of center point. Coordinate system depends on frame field."]
12303    pub y: i32,
12304    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
12305    pub z: f32,
12306    #[doc = "The coordinate system of the fields: x, y, z."]
12307    pub frame: MavFrame,
12308}
12309impl FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12310    pub const ENCODED_LEN: usize = 33usize;
12311    pub const DEFAULT: Self = Self {
12312        time_usec: 0_u64,
12313        major_radius: 0.0_f32,
12314        minor_radius: 0.0_f32,
12315        orientation: 0.0_f32,
12316        x: 0_i32,
12317        y: 0_i32,
12318        z: 0.0_f32,
12319        frame: MavFrame::DEFAULT,
12320    };
12321    #[cfg(feature = "arbitrary")]
12322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12323        use arbitrary::{Arbitrary, Unstructured};
12324        let mut buf = [0u8; 1024];
12325        rng.fill_bytes(&mut buf);
12326        let mut unstructured = Unstructured::new(&buf);
12327        Self::arbitrary(&mut unstructured).unwrap_or_default()
12328    }
12329}
12330impl Default for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12331    fn default() -> Self {
12332        Self::DEFAULT.clone()
12333    }
12334}
12335impl MessageData for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12336    type Message = MavMessage;
12337    const ID: u32 = 361u32;
12338    const NAME: &'static str = "FIGURE_EIGHT_EXECUTION_STATUS";
12339    const EXTRA_CRC: u8 = 93u8;
12340    const ENCODED_LEN: usize = 33usize;
12341    fn deser(
12342        _version: MavlinkVersion,
12343        __input: &[u8],
12344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12345        let avail_len = __input.len();
12346        let mut payload_buf = [0; Self::ENCODED_LEN];
12347        let mut buf = if avail_len < Self::ENCODED_LEN {
12348            payload_buf[0..avail_len].copy_from_slice(__input);
12349            Bytes::new(&payload_buf)
12350        } else {
12351            Bytes::new(__input)
12352        };
12353        let mut __struct = Self::default();
12354        __struct.time_usec = buf.get_u64_le();
12355        __struct.major_radius = buf.get_f32_le();
12356        __struct.minor_radius = buf.get_f32_le();
12357        __struct.orientation = buf.get_f32_le();
12358        __struct.x = buf.get_i32_le();
12359        __struct.y = buf.get_i32_le();
12360        __struct.z = buf.get_f32_le();
12361        let tmp = buf.get_u8();
12362        __struct.frame =
12363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12364                enum_type: "MavFrame",
12365                value: tmp as u32,
12366            })?;
12367        Ok(__struct)
12368    }
12369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12370        let mut __tmp = BytesMut::new(bytes);
12371        #[allow(clippy::absurd_extreme_comparisons)]
12372        #[allow(unused_comparisons)]
12373        if __tmp.remaining() < Self::ENCODED_LEN {
12374            panic!(
12375                "buffer is too small (need {} bytes, but got {})",
12376                Self::ENCODED_LEN,
12377                __tmp.remaining(),
12378            )
12379        }
12380        __tmp.put_u64_le(self.time_usec);
12381        __tmp.put_f32_le(self.major_radius);
12382        __tmp.put_f32_le(self.minor_radius);
12383        __tmp.put_f32_le(self.orientation);
12384        __tmp.put_i32_le(self.x);
12385        __tmp.put_i32_le(self.y);
12386        __tmp.put_f32_le(self.z);
12387        __tmp.put_u8(self.frame as u8);
12388        if matches!(version, MavlinkVersion::V2) {
12389            let len = __tmp.len();
12390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12391        } else {
12392            __tmp.len()
12393        }
12394    }
12395}
12396#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12397#[doc = ""]
12398#[doc = "ID: 110"]
12399#[derive(Debug, Clone, PartialEq)]
12400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12402#[cfg_attr(feature = "ts", derive(TS))]
12403#[cfg_attr(feature = "ts", ts(export))]
12404pub struct FILE_TRANSFER_PROTOCOL_DATA {
12405    #[doc = "Network ID (0 for broadcast)"]
12406    pub target_network: u8,
12407    #[doc = "System ID (0 for broadcast)"]
12408    pub target_system: u8,
12409    #[doc = "Component ID (0 for broadcast)"]
12410    pub target_component: u8,
12411    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12412    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12413    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12414    pub payload: [u8; 251],
12415}
12416impl FILE_TRANSFER_PROTOCOL_DATA {
12417    pub const ENCODED_LEN: usize = 254usize;
12418    pub const DEFAULT: Self = Self {
12419        target_network: 0_u8,
12420        target_system: 0_u8,
12421        target_component: 0_u8,
12422        payload: [0_u8; 251usize],
12423    };
12424    #[cfg(feature = "arbitrary")]
12425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12426        use arbitrary::{Arbitrary, Unstructured};
12427        let mut buf = [0u8; 1024];
12428        rng.fill_bytes(&mut buf);
12429        let mut unstructured = Unstructured::new(&buf);
12430        Self::arbitrary(&mut unstructured).unwrap_or_default()
12431    }
12432}
12433impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12434    fn default() -> Self {
12435        Self::DEFAULT.clone()
12436    }
12437}
12438impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12439    type Message = MavMessage;
12440    const ID: u32 = 110u32;
12441    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12442    const EXTRA_CRC: u8 = 84u8;
12443    const ENCODED_LEN: usize = 254usize;
12444    fn deser(
12445        _version: MavlinkVersion,
12446        __input: &[u8],
12447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12448        let avail_len = __input.len();
12449        let mut payload_buf = [0; Self::ENCODED_LEN];
12450        let mut buf = if avail_len < Self::ENCODED_LEN {
12451            payload_buf[0..avail_len].copy_from_slice(__input);
12452            Bytes::new(&payload_buf)
12453        } else {
12454            Bytes::new(__input)
12455        };
12456        let mut __struct = Self::default();
12457        __struct.target_network = buf.get_u8();
12458        __struct.target_system = buf.get_u8();
12459        __struct.target_component = buf.get_u8();
12460        for v in &mut __struct.payload {
12461            let val = buf.get_u8();
12462            *v = val;
12463        }
12464        Ok(__struct)
12465    }
12466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12467        let mut __tmp = BytesMut::new(bytes);
12468        #[allow(clippy::absurd_extreme_comparisons)]
12469        #[allow(unused_comparisons)]
12470        if __tmp.remaining() < Self::ENCODED_LEN {
12471            panic!(
12472                "buffer is too small (need {} bytes, but got {})",
12473                Self::ENCODED_LEN,
12474                __tmp.remaining(),
12475            )
12476        }
12477        __tmp.put_u8(self.target_network);
12478        __tmp.put_u8(self.target_system);
12479        __tmp.put_u8(self.target_component);
12480        for val in &self.payload {
12481            __tmp.put_u8(*val);
12482        }
12483        if matches!(version, MavlinkVersion::V2) {
12484            let len = __tmp.len();
12485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12486        } else {
12487            __tmp.len()
12488        }
12489    }
12490}
12491#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12492#[doc = ""]
12493#[doc = "ID: 264"]
12494#[derive(Debug, Clone, PartialEq)]
12495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12497#[cfg_attr(feature = "ts", derive(TS))]
12498#[cfg_attr(feature = "ts", ts(export))]
12499pub struct FLIGHT_INFORMATION_DATA {
12500    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12501    pub arming_time_utc: u64,
12502    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12503    pub takeoff_time_utc: u64,
12504    #[doc = "Flight number. Note, field is misnamed UUID."]
12505    pub flight_uuid: u64,
12506    #[doc = "Timestamp (time since system boot)."]
12507    pub time_boot_ms: u32,
12508    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12510    pub landing_time: u32,
12511}
12512impl FLIGHT_INFORMATION_DATA {
12513    pub const ENCODED_LEN: usize = 32usize;
12514    pub const DEFAULT: Self = Self {
12515        arming_time_utc: 0_u64,
12516        takeoff_time_utc: 0_u64,
12517        flight_uuid: 0_u64,
12518        time_boot_ms: 0_u32,
12519        landing_time: 0_u32,
12520    };
12521    #[cfg(feature = "arbitrary")]
12522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12523        use arbitrary::{Arbitrary, Unstructured};
12524        let mut buf = [0u8; 1024];
12525        rng.fill_bytes(&mut buf);
12526        let mut unstructured = Unstructured::new(&buf);
12527        Self::arbitrary(&mut unstructured).unwrap_or_default()
12528    }
12529}
12530impl Default for FLIGHT_INFORMATION_DATA {
12531    fn default() -> Self {
12532        Self::DEFAULT.clone()
12533    }
12534}
12535impl MessageData for FLIGHT_INFORMATION_DATA {
12536    type Message = MavMessage;
12537    const ID: u32 = 264u32;
12538    const NAME: &'static str = "FLIGHT_INFORMATION";
12539    const EXTRA_CRC: u8 = 49u8;
12540    const ENCODED_LEN: usize = 32usize;
12541    fn deser(
12542        _version: MavlinkVersion,
12543        __input: &[u8],
12544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12545        let avail_len = __input.len();
12546        let mut payload_buf = [0; Self::ENCODED_LEN];
12547        let mut buf = if avail_len < Self::ENCODED_LEN {
12548            payload_buf[0..avail_len].copy_from_slice(__input);
12549            Bytes::new(&payload_buf)
12550        } else {
12551            Bytes::new(__input)
12552        };
12553        let mut __struct = Self::default();
12554        __struct.arming_time_utc = buf.get_u64_le();
12555        __struct.takeoff_time_utc = buf.get_u64_le();
12556        __struct.flight_uuid = buf.get_u64_le();
12557        __struct.time_boot_ms = buf.get_u32_le();
12558        __struct.landing_time = buf.get_u32_le();
12559        Ok(__struct)
12560    }
12561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12562        let mut __tmp = BytesMut::new(bytes);
12563        #[allow(clippy::absurd_extreme_comparisons)]
12564        #[allow(unused_comparisons)]
12565        if __tmp.remaining() < Self::ENCODED_LEN {
12566            panic!(
12567                "buffer is too small (need {} bytes, but got {})",
12568                Self::ENCODED_LEN,
12569                __tmp.remaining(),
12570            )
12571        }
12572        __tmp.put_u64_le(self.arming_time_utc);
12573        __tmp.put_u64_le(self.takeoff_time_utc);
12574        __tmp.put_u64_le(self.flight_uuid);
12575        __tmp.put_u32_le(self.time_boot_ms);
12576        if matches!(version, MavlinkVersion::V2) {
12577            __tmp.put_u32_le(self.landing_time);
12578            let len = __tmp.len();
12579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12580        } else {
12581            __tmp.len()
12582        }
12583    }
12584}
12585#[doc = "Current motion information from a designated system."]
12586#[doc = ""]
12587#[doc = "ID: 144"]
12588#[derive(Debug, Clone, PartialEq)]
12589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12591#[cfg_attr(feature = "ts", derive(TS))]
12592#[cfg_attr(feature = "ts", ts(export))]
12593pub struct FOLLOW_TARGET_DATA {
12594    #[doc = "Timestamp (time since system boot)."]
12595    pub timestamp: u64,
12596    #[doc = "button states or switches of a tracker device"]
12597    pub custom_state: u64,
12598    #[doc = "Latitude (WGS84)"]
12599    pub lat: i32,
12600    #[doc = "Longitude (WGS84)"]
12601    pub lon: i32,
12602    #[doc = "Altitude (MSL)"]
12603    pub alt: f32,
12604    #[doc = "target velocity (0,0,0) for unknown"]
12605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12607    pub vel: [f32; 3],
12608    #[doc = "linear target acceleration (0,0,0) for unknown"]
12609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12611    pub acc: [f32; 3],
12612    #[doc = "(0 0 0 0 for unknown)"]
12613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12615    pub attitude_q: [f32; 4],
12616    #[doc = "(0 0 0 for unknown)"]
12617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12619    pub rates: [f32; 3],
12620    #[doc = "eph epv"]
12621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12623    pub position_cov: [f32; 3],
12624    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12625    pub est_capabilities: u8,
12626}
12627impl FOLLOW_TARGET_DATA {
12628    pub const ENCODED_LEN: usize = 93usize;
12629    pub const DEFAULT: Self = Self {
12630        timestamp: 0_u64,
12631        custom_state: 0_u64,
12632        lat: 0_i32,
12633        lon: 0_i32,
12634        alt: 0.0_f32,
12635        vel: [0.0_f32; 3usize],
12636        acc: [0.0_f32; 3usize],
12637        attitude_q: [0.0_f32; 4usize],
12638        rates: [0.0_f32; 3usize],
12639        position_cov: [0.0_f32; 3usize],
12640        est_capabilities: 0_u8,
12641    };
12642    #[cfg(feature = "arbitrary")]
12643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12644        use arbitrary::{Arbitrary, Unstructured};
12645        let mut buf = [0u8; 1024];
12646        rng.fill_bytes(&mut buf);
12647        let mut unstructured = Unstructured::new(&buf);
12648        Self::arbitrary(&mut unstructured).unwrap_or_default()
12649    }
12650}
12651impl Default for FOLLOW_TARGET_DATA {
12652    fn default() -> Self {
12653        Self::DEFAULT.clone()
12654    }
12655}
12656impl MessageData for FOLLOW_TARGET_DATA {
12657    type Message = MavMessage;
12658    const ID: u32 = 144u32;
12659    const NAME: &'static str = "FOLLOW_TARGET";
12660    const EXTRA_CRC: u8 = 127u8;
12661    const ENCODED_LEN: usize = 93usize;
12662    fn deser(
12663        _version: MavlinkVersion,
12664        __input: &[u8],
12665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12666        let avail_len = __input.len();
12667        let mut payload_buf = [0; Self::ENCODED_LEN];
12668        let mut buf = if avail_len < Self::ENCODED_LEN {
12669            payload_buf[0..avail_len].copy_from_slice(__input);
12670            Bytes::new(&payload_buf)
12671        } else {
12672            Bytes::new(__input)
12673        };
12674        let mut __struct = Self::default();
12675        __struct.timestamp = buf.get_u64_le();
12676        __struct.custom_state = buf.get_u64_le();
12677        __struct.lat = buf.get_i32_le();
12678        __struct.lon = buf.get_i32_le();
12679        __struct.alt = buf.get_f32_le();
12680        for v in &mut __struct.vel {
12681            let val = buf.get_f32_le();
12682            *v = val;
12683        }
12684        for v in &mut __struct.acc {
12685            let val = buf.get_f32_le();
12686            *v = val;
12687        }
12688        for v in &mut __struct.attitude_q {
12689            let val = buf.get_f32_le();
12690            *v = val;
12691        }
12692        for v in &mut __struct.rates {
12693            let val = buf.get_f32_le();
12694            *v = val;
12695        }
12696        for v in &mut __struct.position_cov {
12697            let val = buf.get_f32_le();
12698            *v = val;
12699        }
12700        __struct.est_capabilities = buf.get_u8();
12701        Ok(__struct)
12702    }
12703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12704        let mut __tmp = BytesMut::new(bytes);
12705        #[allow(clippy::absurd_extreme_comparisons)]
12706        #[allow(unused_comparisons)]
12707        if __tmp.remaining() < Self::ENCODED_LEN {
12708            panic!(
12709                "buffer is too small (need {} bytes, but got {})",
12710                Self::ENCODED_LEN,
12711                __tmp.remaining(),
12712            )
12713        }
12714        __tmp.put_u64_le(self.timestamp);
12715        __tmp.put_u64_le(self.custom_state);
12716        __tmp.put_i32_le(self.lat);
12717        __tmp.put_i32_le(self.lon);
12718        __tmp.put_f32_le(self.alt);
12719        for val in &self.vel {
12720            __tmp.put_f32_le(*val);
12721        }
12722        for val in &self.acc {
12723            __tmp.put_f32_le(*val);
12724        }
12725        for val in &self.attitude_q {
12726            __tmp.put_f32_le(*val);
12727        }
12728        for val in &self.rates {
12729            __tmp.put_f32_le(*val);
12730        }
12731        for val in &self.position_cov {
12732            __tmp.put_f32_le(*val);
12733        }
12734        __tmp.put_u8(self.est_capabilities);
12735        if matches!(version, MavlinkVersion::V2) {
12736            let len = __tmp.len();
12737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12738        } else {
12739            __tmp.len()
12740        }
12741    }
12742}
12743#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12744#[doc = ""]
12745#[doc = "ID: 371"]
12746#[derive(Debug, Clone, PartialEq)]
12747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12749#[cfg_attr(feature = "ts", derive(TS))]
12750#[cfg_attr(feature = "ts", ts(export))]
12751pub struct FUEL_STATUS_DATA {
12752    #[doc = "Capacity when full. Must be provided."]
12753    pub maximum_fuel: f32,
12754    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12755    pub consumed_fuel: f32,
12756    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12757    pub remaining_fuel: f32,
12758    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12759    pub flow_rate: f32,
12760    #[doc = "Fuel temperature. NaN: field not provided."]
12761    pub temperature: f32,
12762    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12763    pub fuel_type: MavFuelType,
12764    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12765    pub id: u8,
12766    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12767    pub percent_remaining: u8,
12768}
12769impl FUEL_STATUS_DATA {
12770    pub const ENCODED_LEN: usize = 26usize;
12771    pub const DEFAULT: Self = Self {
12772        maximum_fuel: 0.0_f32,
12773        consumed_fuel: 0.0_f32,
12774        remaining_fuel: 0.0_f32,
12775        flow_rate: 0.0_f32,
12776        temperature: 0.0_f32,
12777        fuel_type: MavFuelType::DEFAULT,
12778        id: 0_u8,
12779        percent_remaining: 0_u8,
12780    };
12781    #[cfg(feature = "arbitrary")]
12782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12783        use arbitrary::{Arbitrary, Unstructured};
12784        let mut buf = [0u8; 1024];
12785        rng.fill_bytes(&mut buf);
12786        let mut unstructured = Unstructured::new(&buf);
12787        Self::arbitrary(&mut unstructured).unwrap_or_default()
12788    }
12789}
12790impl Default for FUEL_STATUS_DATA {
12791    fn default() -> Self {
12792        Self::DEFAULT.clone()
12793    }
12794}
12795impl MessageData for FUEL_STATUS_DATA {
12796    type Message = MavMessage;
12797    const ID: u32 = 371u32;
12798    const NAME: &'static str = "FUEL_STATUS";
12799    const EXTRA_CRC: u8 = 10u8;
12800    const ENCODED_LEN: usize = 26usize;
12801    fn deser(
12802        _version: MavlinkVersion,
12803        __input: &[u8],
12804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12805        let avail_len = __input.len();
12806        let mut payload_buf = [0; Self::ENCODED_LEN];
12807        let mut buf = if avail_len < Self::ENCODED_LEN {
12808            payload_buf[0..avail_len].copy_from_slice(__input);
12809            Bytes::new(&payload_buf)
12810        } else {
12811            Bytes::new(__input)
12812        };
12813        let mut __struct = Self::default();
12814        __struct.maximum_fuel = buf.get_f32_le();
12815        __struct.consumed_fuel = buf.get_f32_le();
12816        __struct.remaining_fuel = buf.get_f32_le();
12817        __struct.flow_rate = buf.get_f32_le();
12818        __struct.temperature = buf.get_f32_le();
12819        let tmp = buf.get_u32_le();
12820        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12821            ::mavlink_core::error::ParserError::InvalidEnum {
12822                enum_type: "MavFuelType",
12823                value: tmp as u32,
12824            },
12825        )?;
12826        __struct.id = buf.get_u8();
12827        __struct.percent_remaining = buf.get_u8();
12828        Ok(__struct)
12829    }
12830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12831        let mut __tmp = BytesMut::new(bytes);
12832        #[allow(clippy::absurd_extreme_comparisons)]
12833        #[allow(unused_comparisons)]
12834        if __tmp.remaining() < Self::ENCODED_LEN {
12835            panic!(
12836                "buffer is too small (need {} bytes, but got {})",
12837                Self::ENCODED_LEN,
12838                __tmp.remaining(),
12839            )
12840        }
12841        __tmp.put_f32_le(self.maximum_fuel);
12842        __tmp.put_f32_le(self.consumed_fuel);
12843        __tmp.put_f32_le(self.remaining_fuel);
12844        __tmp.put_f32_le(self.flow_rate);
12845        __tmp.put_f32_le(self.temperature);
12846        __tmp.put_u32_le(self.fuel_type as u32);
12847        __tmp.put_u8(self.id);
12848        __tmp.put_u8(self.percent_remaining);
12849        if matches!(version, MavlinkVersion::V2) {
12850            let len = __tmp.len();
12851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12852        } else {
12853            __tmp.len()
12854        }
12855    }
12856}
12857#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12858#[doc = ""]
12859#[doc = "ID: 373"]
12860#[derive(Debug, Clone, PartialEq)]
12861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12863#[cfg_attr(feature = "ts", derive(TS))]
12864#[cfg_attr(feature = "ts", ts(export))]
12865pub struct GENERATOR_STATUS_DATA {
12866    #[doc = "Status flags."]
12867    pub status: MavGeneratorStatusFlag,
12868    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12869    pub battery_current: f32,
12870    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12871    pub load_current: f32,
12872    #[doc = "The power being generated. NaN: field not provided"]
12873    pub power_generated: f32,
12874    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12875    pub bus_voltage: f32,
12876    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12877    pub bat_current_setpoint: f32,
12878    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12879    pub runtime: u32,
12880    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12881    pub time_until_maintenance: i32,
12882    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12883    pub generator_speed: u16,
12884    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12885    pub rectifier_temperature: i16,
12886    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12887    pub generator_temperature: i16,
12888}
12889impl GENERATOR_STATUS_DATA {
12890    pub const ENCODED_LEN: usize = 42usize;
12891    pub const DEFAULT: Self = Self {
12892        status: MavGeneratorStatusFlag::DEFAULT,
12893        battery_current: 0.0_f32,
12894        load_current: 0.0_f32,
12895        power_generated: 0.0_f32,
12896        bus_voltage: 0.0_f32,
12897        bat_current_setpoint: 0.0_f32,
12898        runtime: 0_u32,
12899        time_until_maintenance: 0_i32,
12900        generator_speed: 0_u16,
12901        rectifier_temperature: 0_i16,
12902        generator_temperature: 0_i16,
12903    };
12904    #[cfg(feature = "arbitrary")]
12905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12906        use arbitrary::{Arbitrary, Unstructured};
12907        let mut buf = [0u8; 1024];
12908        rng.fill_bytes(&mut buf);
12909        let mut unstructured = Unstructured::new(&buf);
12910        Self::arbitrary(&mut unstructured).unwrap_or_default()
12911    }
12912}
12913impl Default for GENERATOR_STATUS_DATA {
12914    fn default() -> Self {
12915        Self::DEFAULT.clone()
12916    }
12917}
12918impl MessageData for GENERATOR_STATUS_DATA {
12919    type Message = MavMessage;
12920    const ID: u32 = 373u32;
12921    const NAME: &'static str = "GENERATOR_STATUS";
12922    const EXTRA_CRC: u8 = 117u8;
12923    const ENCODED_LEN: usize = 42usize;
12924    fn deser(
12925        _version: MavlinkVersion,
12926        __input: &[u8],
12927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12928        let avail_len = __input.len();
12929        let mut payload_buf = [0; Self::ENCODED_LEN];
12930        let mut buf = if avail_len < Self::ENCODED_LEN {
12931            payload_buf[0..avail_len].copy_from_slice(__input);
12932            Bytes::new(&payload_buf)
12933        } else {
12934            Bytes::new(__input)
12935        };
12936        let mut __struct = Self::default();
12937        let tmp = buf.get_u64_le();
12938        __struct.status = MavGeneratorStatusFlag::from_bits(
12939            tmp & MavGeneratorStatusFlag::all().bits(),
12940        )
12941        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12942            flag_type: "MavGeneratorStatusFlag",
12943            value: tmp as u32,
12944        })?;
12945        __struct.battery_current = buf.get_f32_le();
12946        __struct.load_current = buf.get_f32_le();
12947        __struct.power_generated = buf.get_f32_le();
12948        __struct.bus_voltage = buf.get_f32_le();
12949        __struct.bat_current_setpoint = buf.get_f32_le();
12950        __struct.runtime = buf.get_u32_le();
12951        __struct.time_until_maintenance = buf.get_i32_le();
12952        __struct.generator_speed = buf.get_u16_le();
12953        __struct.rectifier_temperature = buf.get_i16_le();
12954        __struct.generator_temperature = buf.get_i16_le();
12955        Ok(__struct)
12956    }
12957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12958        let mut __tmp = BytesMut::new(bytes);
12959        #[allow(clippy::absurd_extreme_comparisons)]
12960        #[allow(unused_comparisons)]
12961        if __tmp.remaining() < Self::ENCODED_LEN {
12962            panic!(
12963                "buffer is too small (need {} bytes, but got {})",
12964                Self::ENCODED_LEN,
12965                __tmp.remaining(),
12966            )
12967        }
12968        __tmp.put_u64_le(self.status.bits());
12969        __tmp.put_f32_le(self.battery_current);
12970        __tmp.put_f32_le(self.load_current);
12971        __tmp.put_f32_le(self.power_generated);
12972        __tmp.put_f32_le(self.bus_voltage);
12973        __tmp.put_f32_le(self.bat_current_setpoint);
12974        __tmp.put_u32_le(self.runtime);
12975        __tmp.put_i32_le(self.time_until_maintenance);
12976        __tmp.put_u16_le(self.generator_speed);
12977        __tmp.put_i16_le(self.rectifier_temperature);
12978        __tmp.put_i16_le(self.generator_temperature);
12979        if matches!(version, MavlinkVersion::V2) {
12980            let len = __tmp.len();
12981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12982        } else {
12983            __tmp.len()
12984        }
12985    }
12986}
12987#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12988#[doc = ""]
12989#[doc = "ID: 285"]
12990#[derive(Debug, Clone, PartialEq)]
12991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12993#[cfg_attr(feature = "ts", derive(TS))]
12994#[cfg_attr(feature = "ts", ts(export))]
12995pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12996    #[doc = "Timestamp (time since system boot)."]
12997    pub time_boot_ms: u32,
12998    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12999    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13000    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13001    pub q: [f32; 4],
13002    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13003    pub angular_velocity_x: f32,
13004    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13005    pub angular_velocity_y: f32,
13006    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13007    pub angular_velocity_z: f32,
13008    #[doc = "Failure flags (0 for no failure)"]
13009    pub failure_flags: GimbalDeviceErrorFlags,
13010    #[doc = "Current gimbal flags set."]
13011    pub flags: GimbalDeviceFlags,
13012    #[doc = "System ID"]
13013    pub target_system: u8,
13014    #[doc = "Component ID"]
13015    pub target_component: u8,
13016    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13018    pub delta_yaw: f32,
13019    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13021    pub delta_yaw_velocity: f32,
13022    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13024    pub gimbal_device_id: u8,
13025}
13026impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13027    pub const ENCODED_LEN: usize = 49usize;
13028    pub const DEFAULT: Self = Self {
13029        time_boot_ms: 0_u32,
13030        q: [0.0_f32; 4usize],
13031        angular_velocity_x: 0.0_f32,
13032        angular_velocity_y: 0.0_f32,
13033        angular_velocity_z: 0.0_f32,
13034        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13035        flags: GimbalDeviceFlags::DEFAULT,
13036        target_system: 0_u8,
13037        target_component: 0_u8,
13038        delta_yaw: 0.0_f32,
13039        delta_yaw_velocity: 0.0_f32,
13040        gimbal_device_id: 0_u8,
13041    };
13042    #[cfg(feature = "arbitrary")]
13043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13044        use arbitrary::{Arbitrary, Unstructured};
13045        let mut buf = [0u8; 1024];
13046        rng.fill_bytes(&mut buf);
13047        let mut unstructured = Unstructured::new(&buf);
13048        Self::arbitrary(&mut unstructured).unwrap_or_default()
13049    }
13050}
13051impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13052    fn default() -> Self {
13053        Self::DEFAULT.clone()
13054    }
13055}
13056impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13057    type Message = MavMessage;
13058    const ID: u32 = 285u32;
13059    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13060    const EXTRA_CRC: u8 = 137u8;
13061    const ENCODED_LEN: usize = 49usize;
13062    fn deser(
13063        _version: MavlinkVersion,
13064        __input: &[u8],
13065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13066        let avail_len = __input.len();
13067        let mut payload_buf = [0; Self::ENCODED_LEN];
13068        let mut buf = if avail_len < Self::ENCODED_LEN {
13069            payload_buf[0..avail_len].copy_from_slice(__input);
13070            Bytes::new(&payload_buf)
13071        } else {
13072            Bytes::new(__input)
13073        };
13074        let mut __struct = Self::default();
13075        __struct.time_boot_ms = buf.get_u32_le();
13076        for v in &mut __struct.q {
13077            let val = buf.get_f32_le();
13078            *v = val;
13079        }
13080        __struct.angular_velocity_x = buf.get_f32_le();
13081        __struct.angular_velocity_y = buf.get_f32_le();
13082        __struct.angular_velocity_z = buf.get_f32_le();
13083        let tmp = buf.get_u32_le();
13084        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
13085            tmp & GimbalDeviceErrorFlags::all().bits(),
13086        )
13087        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13088            flag_type: "GimbalDeviceErrorFlags",
13089            value: tmp as u32,
13090        })?;
13091        let tmp = buf.get_u16_le();
13092        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13093            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13094                flag_type: "GimbalDeviceFlags",
13095                value: tmp as u32,
13096            })?;
13097        __struct.target_system = buf.get_u8();
13098        __struct.target_component = buf.get_u8();
13099        __struct.delta_yaw = buf.get_f32_le();
13100        __struct.delta_yaw_velocity = buf.get_f32_le();
13101        __struct.gimbal_device_id = buf.get_u8();
13102        Ok(__struct)
13103    }
13104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13105        let mut __tmp = BytesMut::new(bytes);
13106        #[allow(clippy::absurd_extreme_comparisons)]
13107        #[allow(unused_comparisons)]
13108        if __tmp.remaining() < Self::ENCODED_LEN {
13109            panic!(
13110                "buffer is too small (need {} bytes, but got {})",
13111                Self::ENCODED_LEN,
13112                __tmp.remaining(),
13113            )
13114        }
13115        __tmp.put_u32_le(self.time_boot_ms);
13116        for val in &self.q {
13117            __tmp.put_f32_le(*val);
13118        }
13119        __tmp.put_f32_le(self.angular_velocity_x);
13120        __tmp.put_f32_le(self.angular_velocity_y);
13121        __tmp.put_f32_le(self.angular_velocity_z);
13122        __tmp.put_u32_le(self.failure_flags.bits());
13123        __tmp.put_u16_le(self.flags.bits());
13124        __tmp.put_u8(self.target_system);
13125        __tmp.put_u8(self.target_component);
13126        if matches!(version, MavlinkVersion::V2) {
13127            __tmp.put_f32_le(self.delta_yaw);
13128            __tmp.put_f32_le(self.delta_yaw_velocity);
13129            __tmp.put_u8(self.gimbal_device_id);
13130            let len = __tmp.len();
13131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13132        } else {
13133            __tmp.len()
13134        }
13135    }
13136}
13137#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13138#[doc = ""]
13139#[doc = "ID: 283"]
13140#[derive(Debug, Clone, PartialEq)]
13141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13143#[cfg_attr(feature = "ts", derive(TS))]
13144#[cfg_attr(feature = "ts", ts(export))]
13145pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13146    #[doc = "UID of gimbal hardware (0 if unknown)."]
13147    pub uid: u64,
13148    #[doc = "Timestamp (time since system boot)."]
13149    pub time_boot_ms: u32,
13150    #[doc = "0xff)."]
13151    pub firmware_version: u32,
13152    #[doc = "0xff)."]
13153    pub hardware_version: u32,
13154    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13155    pub roll_min: f32,
13156    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13157    pub roll_max: f32,
13158    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13159    pub pitch_min: f32,
13160    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13161    pub pitch_max: f32,
13162    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13163    pub yaw_min: f32,
13164    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13165    pub yaw_max: f32,
13166    #[doc = "Bitmap of gimbal capability flags."]
13167    pub cap_flags: GimbalDeviceCapFlags,
13168    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13169    pub custom_cap_flags: u16,
13170    #[doc = "Name of the gimbal vendor."]
13171    #[cfg_attr(
13172        feature = "serde",
13173        serde(
13174            serialize_with = "crate::nulstr::serialize::<_, 32>",
13175            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
13176        )
13177    )]
13178    #[cfg_attr(feature = "ts", ts(type = "string"))]
13179    pub vendor_name: [u8; 32],
13180    #[doc = "Name of the gimbal model."]
13181    #[cfg_attr(
13182        feature = "serde",
13183        serde(
13184            serialize_with = "crate::nulstr::serialize::<_, 32>",
13185            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
13186        )
13187    )]
13188    #[cfg_attr(feature = "ts", ts(type = "string"))]
13189    pub model_name: [u8; 32],
13190    #[doc = "Custom name of the gimbal given to it by the user."]
13191    #[cfg_attr(
13192        feature = "serde",
13193        serde(
13194            serialize_with = "crate::nulstr::serialize::<_, 32>",
13195            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
13196        )
13197    )]
13198    #[cfg_attr(feature = "ts", ts(type = "string"))]
13199    pub custom_name: [u8; 32],
13200    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13201    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13202    pub gimbal_device_id: u8,
13203}
13204impl GIMBAL_DEVICE_INFORMATION_DATA {
13205    pub const ENCODED_LEN: usize = 145usize;
13206    pub const DEFAULT: Self = Self {
13207        uid: 0_u64,
13208        time_boot_ms: 0_u32,
13209        firmware_version: 0_u32,
13210        hardware_version: 0_u32,
13211        roll_min: 0.0_f32,
13212        roll_max: 0.0_f32,
13213        pitch_min: 0.0_f32,
13214        pitch_max: 0.0_f32,
13215        yaw_min: 0.0_f32,
13216        yaw_max: 0.0_f32,
13217        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13218        custom_cap_flags: 0_u16,
13219        vendor_name: [0_u8; 32usize],
13220        model_name: [0_u8; 32usize],
13221        custom_name: [0_u8; 32usize],
13222        gimbal_device_id: 0_u8,
13223    };
13224    #[cfg(feature = "arbitrary")]
13225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13226        use arbitrary::{Arbitrary, Unstructured};
13227        let mut buf = [0u8; 1024];
13228        rng.fill_bytes(&mut buf);
13229        let mut unstructured = Unstructured::new(&buf);
13230        Self::arbitrary(&mut unstructured).unwrap_or_default()
13231    }
13232}
13233impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13234    fn default() -> Self {
13235        Self::DEFAULT.clone()
13236    }
13237}
13238impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13239    type Message = MavMessage;
13240    const ID: u32 = 283u32;
13241    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13242    const EXTRA_CRC: u8 = 74u8;
13243    const ENCODED_LEN: usize = 145usize;
13244    fn deser(
13245        _version: MavlinkVersion,
13246        __input: &[u8],
13247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13248        let avail_len = __input.len();
13249        let mut payload_buf = [0; Self::ENCODED_LEN];
13250        let mut buf = if avail_len < Self::ENCODED_LEN {
13251            payload_buf[0..avail_len].copy_from_slice(__input);
13252            Bytes::new(&payload_buf)
13253        } else {
13254            Bytes::new(__input)
13255        };
13256        let mut __struct = Self::default();
13257        __struct.uid = buf.get_u64_le();
13258        __struct.time_boot_ms = buf.get_u32_le();
13259        __struct.firmware_version = buf.get_u32_le();
13260        __struct.hardware_version = buf.get_u32_le();
13261        __struct.roll_min = buf.get_f32_le();
13262        __struct.roll_max = buf.get_f32_le();
13263        __struct.pitch_min = buf.get_f32_le();
13264        __struct.pitch_max = buf.get_f32_le();
13265        __struct.yaw_min = buf.get_f32_le();
13266        __struct.yaw_max = buf.get_f32_le();
13267        let tmp = buf.get_u16_le();
13268        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13269            tmp & GimbalDeviceCapFlags::all().bits(),
13270        )
13271        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13272            flag_type: "GimbalDeviceCapFlags",
13273            value: tmp as u32,
13274        })?;
13275        __struct.custom_cap_flags = buf.get_u16_le();
13276        for v in &mut __struct.vendor_name {
13277            let val = buf.get_u8();
13278            *v = val;
13279        }
13280        for v in &mut __struct.model_name {
13281            let val = buf.get_u8();
13282            *v = val;
13283        }
13284        for v in &mut __struct.custom_name {
13285            let val = buf.get_u8();
13286            *v = val;
13287        }
13288        __struct.gimbal_device_id = buf.get_u8();
13289        Ok(__struct)
13290    }
13291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13292        let mut __tmp = BytesMut::new(bytes);
13293        #[allow(clippy::absurd_extreme_comparisons)]
13294        #[allow(unused_comparisons)]
13295        if __tmp.remaining() < Self::ENCODED_LEN {
13296            panic!(
13297                "buffer is too small (need {} bytes, but got {})",
13298                Self::ENCODED_LEN,
13299                __tmp.remaining(),
13300            )
13301        }
13302        __tmp.put_u64_le(self.uid);
13303        __tmp.put_u32_le(self.time_boot_ms);
13304        __tmp.put_u32_le(self.firmware_version);
13305        __tmp.put_u32_le(self.hardware_version);
13306        __tmp.put_f32_le(self.roll_min);
13307        __tmp.put_f32_le(self.roll_max);
13308        __tmp.put_f32_le(self.pitch_min);
13309        __tmp.put_f32_le(self.pitch_max);
13310        __tmp.put_f32_le(self.yaw_min);
13311        __tmp.put_f32_le(self.yaw_max);
13312        __tmp.put_u16_le(self.cap_flags.bits());
13313        __tmp.put_u16_le(self.custom_cap_flags);
13314        for val in &self.vendor_name {
13315            __tmp.put_u8(*val);
13316        }
13317        for val in &self.model_name {
13318            __tmp.put_u8(*val);
13319        }
13320        for val in &self.custom_name {
13321            __tmp.put_u8(*val);
13322        }
13323        if matches!(version, MavlinkVersion::V2) {
13324            __tmp.put_u8(self.gimbal_device_id);
13325            let len = __tmp.len();
13326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13327        } else {
13328            __tmp.len()
13329        }
13330    }
13331}
13332#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13333#[doc = ""]
13334#[doc = "ID: 284"]
13335#[derive(Debug, Clone, PartialEq)]
13336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13338#[cfg_attr(feature = "ts", derive(TS))]
13339#[cfg_attr(feature = "ts", ts(export))]
13340pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13341    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13344    pub q: [f32; 4],
13345    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13346    pub angular_velocity_x: f32,
13347    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13348    pub angular_velocity_y: f32,
13349    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13350    pub angular_velocity_z: f32,
13351    #[doc = "Low level gimbal flags."]
13352    pub flags: GimbalDeviceFlags,
13353    #[doc = "System ID"]
13354    pub target_system: u8,
13355    #[doc = "Component ID"]
13356    pub target_component: u8,
13357}
13358impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13359    pub const ENCODED_LEN: usize = 32usize;
13360    pub const DEFAULT: Self = Self {
13361        q: [0.0_f32; 4usize],
13362        angular_velocity_x: 0.0_f32,
13363        angular_velocity_y: 0.0_f32,
13364        angular_velocity_z: 0.0_f32,
13365        flags: GimbalDeviceFlags::DEFAULT,
13366        target_system: 0_u8,
13367        target_component: 0_u8,
13368    };
13369    #[cfg(feature = "arbitrary")]
13370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13371        use arbitrary::{Arbitrary, Unstructured};
13372        let mut buf = [0u8; 1024];
13373        rng.fill_bytes(&mut buf);
13374        let mut unstructured = Unstructured::new(&buf);
13375        Self::arbitrary(&mut unstructured).unwrap_or_default()
13376    }
13377}
13378impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13379    fn default() -> Self {
13380        Self::DEFAULT.clone()
13381    }
13382}
13383impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13384    type Message = MavMessage;
13385    const ID: u32 = 284u32;
13386    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13387    const EXTRA_CRC: u8 = 99u8;
13388    const ENCODED_LEN: usize = 32usize;
13389    fn deser(
13390        _version: MavlinkVersion,
13391        __input: &[u8],
13392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13393        let avail_len = __input.len();
13394        let mut payload_buf = [0; Self::ENCODED_LEN];
13395        let mut buf = if avail_len < Self::ENCODED_LEN {
13396            payload_buf[0..avail_len].copy_from_slice(__input);
13397            Bytes::new(&payload_buf)
13398        } else {
13399            Bytes::new(__input)
13400        };
13401        let mut __struct = Self::default();
13402        for v in &mut __struct.q {
13403            let val = buf.get_f32_le();
13404            *v = val;
13405        }
13406        __struct.angular_velocity_x = buf.get_f32_le();
13407        __struct.angular_velocity_y = buf.get_f32_le();
13408        __struct.angular_velocity_z = buf.get_f32_le();
13409        let tmp = buf.get_u16_le();
13410        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13411            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13412                flag_type: "GimbalDeviceFlags",
13413                value: tmp as u32,
13414            })?;
13415        __struct.target_system = buf.get_u8();
13416        __struct.target_component = buf.get_u8();
13417        Ok(__struct)
13418    }
13419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13420        let mut __tmp = BytesMut::new(bytes);
13421        #[allow(clippy::absurd_extreme_comparisons)]
13422        #[allow(unused_comparisons)]
13423        if __tmp.remaining() < Self::ENCODED_LEN {
13424            panic!(
13425                "buffer is too small (need {} bytes, but got {})",
13426                Self::ENCODED_LEN,
13427                __tmp.remaining(),
13428            )
13429        }
13430        for val in &self.q {
13431            __tmp.put_f32_le(*val);
13432        }
13433        __tmp.put_f32_le(self.angular_velocity_x);
13434        __tmp.put_f32_le(self.angular_velocity_y);
13435        __tmp.put_f32_le(self.angular_velocity_z);
13436        __tmp.put_u16_le(self.flags.bits());
13437        __tmp.put_u8(self.target_system);
13438        __tmp.put_u8(self.target_component);
13439        if matches!(version, MavlinkVersion::V2) {
13440            let len = __tmp.len();
13441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13442        } else {
13443            __tmp.len()
13444        }
13445    }
13446}
13447#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13448#[doc = ""]
13449#[doc = "ID: 280"]
13450#[derive(Debug, Clone, PartialEq)]
13451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13453#[cfg_attr(feature = "ts", derive(TS))]
13454#[cfg_attr(feature = "ts", ts(export))]
13455pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13456    #[doc = "Timestamp (time since system boot)."]
13457    pub time_boot_ms: u32,
13458    #[doc = "Bitmap of gimbal capability flags."]
13459    pub cap_flags: GimbalManagerCapFlags,
13460    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13461    pub roll_min: f32,
13462    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13463    pub roll_max: f32,
13464    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13465    pub pitch_min: f32,
13466    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13467    pub pitch_max: f32,
13468    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13469    pub yaw_min: f32,
13470    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13471    pub yaw_max: f32,
13472    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13473    pub gimbal_device_id: u8,
13474}
13475impl GIMBAL_MANAGER_INFORMATION_DATA {
13476    pub const ENCODED_LEN: usize = 33usize;
13477    pub const DEFAULT: Self = Self {
13478        time_boot_ms: 0_u32,
13479        cap_flags: GimbalManagerCapFlags::DEFAULT,
13480        roll_min: 0.0_f32,
13481        roll_max: 0.0_f32,
13482        pitch_min: 0.0_f32,
13483        pitch_max: 0.0_f32,
13484        yaw_min: 0.0_f32,
13485        yaw_max: 0.0_f32,
13486        gimbal_device_id: 0_u8,
13487    };
13488    #[cfg(feature = "arbitrary")]
13489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13490        use arbitrary::{Arbitrary, Unstructured};
13491        let mut buf = [0u8; 1024];
13492        rng.fill_bytes(&mut buf);
13493        let mut unstructured = Unstructured::new(&buf);
13494        Self::arbitrary(&mut unstructured).unwrap_or_default()
13495    }
13496}
13497impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13498    fn default() -> Self {
13499        Self::DEFAULT.clone()
13500    }
13501}
13502impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13503    type Message = MavMessage;
13504    const ID: u32 = 280u32;
13505    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13506    const EXTRA_CRC: u8 = 70u8;
13507    const ENCODED_LEN: usize = 33usize;
13508    fn deser(
13509        _version: MavlinkVersion,
13510        __input: &[u8],
13511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13512        let avail_len = __input.len();
13513        let mut payload_buf = [0; Self::ENCODED_LEN];
13514        let mut buf = if avail_len < Self::ENCODED_LEN {
13515            payload_buf[0..avail_len].copy_from_slice(__input);
13516            Bytes::new(&payload_buf)
13517        } else {
13518            Bytes::new(__input)
13519        };
13520        let mut __struct = Self::default();
13521        __struct.time_boot_ms = buf.get_u32_le();
13522        let tmp = buf.get_u32_le();
13523        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13524            tmp & GimbalManagerCapFlags::all().bits(),
13525        )
13526        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13527            flag_type: "GimbalManagerCapFlags",
13528            value: tmp as u32,
13529        })?;
13530        __struct.roll_min = buf.get_f32_le();
13531        __struct.roll_max = buf.get_f32_le();
13532        __struct.pitch_min = buf.get_f32_le();
13533        __struct.pitch_max = buf.get_f32_le();
13534        __struct.yaw_min = buf.get_f32_le();
13535        __struct.yaw_max = buf.get_f32_le();
13536        __struct.gimbal_device_id = buf.get_u8();
13537        Ok(__struct)
13538    }
13539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13540        let mut __tmp = BytesMut::new(bytes);
13541        #[allow(clippy::absurd_extreme_comparisons)]
13542        #[allow(unused_comparisons)]
13543        if __tmp.remaining() < Self::ENCODED_LEN {
13544            panic!(
13545                "buffer is too small (need {} bytes, but got {})",
13546                Self::ENCODED_LEN,
13547                __tmp.remaining(),
13548            )
13549        }
13550        __tmp.put_u32_le(self.time_boot_ms);
13551        __tmp.put_u32_le(self.cap_flags.bits());
13552        __tmp.put_f32_le(self.roll_min);
13553        __tmp.put_f32_le(self.roll_max);
13554        __tmp.put_f32_le(self.pitch_min);
13555        __tmp.put_f32_le(self.pitch_max);
13556        __tmp.put_f32_le(self.yaw_min);
13557        __tmp.put_f32_le(self.yaw_max);
13558        __tmp.put_u8(self.gimbal_device_id);
13559        if matches!(version, MavlinkVersion::V2) {
13560            let len = __tmp.len();
13561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13562        } else {
13563            __tmp.len()
13564        }
13565    }
13566}
13567#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13568#[doc = ""]
13569#[doc = "ID: 282"]
13570#[derive(Debug, Clone, PartialEq)]
13571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13573#[cfg_attr(feature = "ts", derive(TS))]
13574#[cfg_attr(feature = "ts", ts(export))]
13575pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13576    #[doc = "High level gimbal manager flags to use."]
13577    pub flags: GimbalManagerFlags,
13578    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13579    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13580    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13581    pub q: [f32; 4],
13582    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13583    pub angular_velocity_x: f32,
13584    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13585    pub angular_velocity_y: f32,
13586    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13587    pub angular_velocity_z: f32,
13588    #[doc = "System ID"]
13589    pub target_system: u8,
13590    #[doc = "Component ID"]
13591    pub target_component: u8,
13592    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13593    pub gimbal_device_id: u8,
13594}
13595impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13596    pub const ENCODED_LEN: usize = 35usize;
13597    pub const DEFAULT: Self = Self {
13598        flags: GimbalManagerFlags::DEFAULT,
13599        q: [0.0_f32; 4usize],
13600        angular_velocity_x: 0.0_f32,
13601        angular_velocity_y: 0.0_f32,
13602        angular_velocity_z: 0.0_f32,
13603        target_system: 0_u8,
13604        target_component: 0_u8,
13605        gimbal_device_id: 0_u8,
13606    };
13607    #[cfg(feature = "arbitrary")]
13608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13609        use arbitrary::{Arbitrary, Unstructured};
13610        let mut buf = [0u8; 1024];
13611        rng.fill_bytes(&mut buf);
13612        let mut unstructured = Unstructured::new(&buf);
13613        Self::arbitrary(&mut unstructured).unwrap_or_default()
13614    }
13615}
13616impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13617    fn default() -> Self {
13618        Self::DEFAULT.clone()
13619    }
13620}
13621impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13622    type Message = MavMessage;
13623    const ID: u32 = 282u32;
13624    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13625    const EXTRA_CRC: u8 = 123u8;
13626    const ENCODED_LEN: usize = 35usize;
13627    fn deser(
13628        _version: MavlinkVersion,
13629        __input: &[u8],
13630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13631        let avail_len = __input.len();
13632        let mut payload_buf = [0; Self::ENCODED_LEN];
13633        let mut buf = if avail_len < Self::ENCODED_LEN {
13634            payload_buf[0..avail_len].copy_from_slice(__input);
13635            Bytes::new(&payload_buf)
13636        } else {
13637            Bytes::new(__input)
13638        };
13639        let mut __struct = Self::default();
13640        let tmp = buf.get_u32_le();
13641        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13642            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13643                flag_type: "GimbalManagerFlags",
13644                value: tmp as u32,
13645            })?;
13646        for v in &mut __struct.q {
13647            let val = buf.get_f32_le();
13648            *v = val;
13649        }
13650        __struct.angular_velocity_x = buf.get_f32_le();
13651        __struct.angular_velocity_y = buf.get_f32_le();
13652        __struct.angular_velocity_z = buf.get_f32_le();
13653        __struct.target_system = buf.get_u8();
13654        __struct.target_component = buf.get_u8();
13655        __struct.gimbal_device_id = buf.get_u8();
13656        Ok(__struct)
13657    }
13658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13659        let mut __tmp = BytesMut::new(bytes);
13660        #[allow(clippy::absurd_extreme_comparisons)]
13661        #[allow(unused_comparisons)]
13662        if __tmp.remaining() < Self::ENCODED_LEN {
13663            panic!(
13664                "buffer is too small (need {} bytes, but got {})",
13665                Self::ENCODED_LEN,
13666                __tmp.remaining(),
13667            )
13668        }
13669        __tmp.put_u32_le(self.flags.bits());
13670        for val in &self.q {
13671            __tmp.put_f32_le(*val);
13672        }
13673        __tmp.put_f32_le(self.angular_velocity_x);
13674        __tmp.put_f32_le(self.angular_velocity_y);
13675        __tmp.put_f32_le(self.angular_velocity_z);
13676        __tmp.put_u8(self.target_system);
13677        __tmp.put_u8(self.target_component);
13678        __tmp.put_u8(self.gimbal_device_id);
13679        if matches!(version, MavlinkVersion::V2) {
13680            let len = __tmp.len();
13681            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13682        } else {
13683            __tmp.len()
13684        }
13685    }
13686}
13687#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13688#[doc = ""]
13689#[doc = "ID: 288"]
13690#[derive(Debug, Clone, PartialEq)]
13691#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13693#[cfg_attr(feature = "ts", derive(TS))]
13694#[cfg_attr(feature = "ts", ts(export))]
13695pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13696    #[doc = "High level gimbal manager flags."]
13697    pub flags: GimbalManagerFlags,
13698    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13699    pub pitch: f32,
13700    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13701    pub yaw: f32,
13702    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13703    pub pitch_rate: f32,
13704    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13705    pub yaw_rate: f32,
13706    #[doc = "System ID"]
13707    pub target_system: u8,
13708    #[doc = "Component ID"]
13709    pub target_component: u8,
13710    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13711    pub gimbal_device_id: u8,
13712}
13713impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13714    pub const ENCODED_LEN: usize = 23usize;
13715    pub const DEFAULT: Self = Self {
13716        flags: GimbalManagerFlags::DEFAULT,
13717        pitch: 0.0_f32,
13718        yaw: 0.0_f32,
13719        pitch_rate: 0.0_f32,
13720        yaw_rate: 0.0_f32,
13721        target_system: 0_u8,
13722        target_component: 0_u8,
13723        gimbal_device_id: 0_u8,
13724    };
13725    #[cfg(feature = "arbitrary")]
13726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13727        use arbitrary::{Arbitrary, Unstructured};
13728        let mut buf = [0u8; 1024];
13729        rng.fill_bytes(&mut buf);
13730        let mut unstructured = Unstructured::new(&buf);
13731        Self::arbitrary(&mut unstructured).unwrap_or_default()
13732    }
13733}
13734impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13735    fn default() -> Self {
13736        Self::DEFAULT.clone()
13737    }
13738}
13739impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13740    type Message = MavMessage;
13741    const ID: u32 = 288u32;
13742    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13743    const EXTRA_CRC: u8 = 20u8;
13744    const ENCODED_LEN: usize = 23usize;
13745    fn deser(
13746        _version: MavlinkVersion,
13747        __input: &[u8],
13748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13749        let avail_len = __input.len();
13750        let mut payload_buf = [0; Self::ENCODED_LEN];
13751        let mut buf = if avail_len < Self::ENCODED_LEN {
13752            payload_buf[0..avail_len].copy_from_slice(__input);
13753            Bytes::new(&payload_buf)
13754        } else {
13755            Bytes::new(__input)
13756        };
13757        let mut __struct = Self::default();
13758        let tmp = buf.get_u32_le();
13759        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13760            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13761                flag_type: "GimbalManagerFlags",
13762                value: tmp as u32,
13763            })?;
13764        __struct.pitch = buf.get_f32_le();
13765        __struct.yaw = buf.get_f32_le();
13766        __struct.pitch_rate = buf.get_f32_le();
13767        __struct.yaw_rate = buf.get_f32_le();
13768        __struct.target_system = buf.get_u8();
13769        __struct.target_component = buf.get_u8();
13770        __struct.gimbal_device_id = buf.get_u8();
13771        Ok(__struct)
13772    }
13773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13774        let mut __tmp = BytesMut::new(bytes);
13775        #[allow(clippy::absurd_extreme_comparisons)]
13776        #[allow(unused_comparisons)]
13777        if __tmp.remaining() < Self::ENCODED_LEN {
13778            panic!(
13779                "buffer is too small (need {} bytes, but got {})",
13780                Self::ENCODED_LEN,
13781                __tmp.remaining(),
13782            )
13783        }
13784        __tmp.put_u32_le(self.flags.bits());
13785        __tmp.put_f32_le(self.pitch);
13786        __tmp.put_f32_le(self.yaw);
13787        __tmp.put_f32_le(self.pitch_rate);
13788        __tmp.put_f32_le(self.yaw_rate);
13789        __tmp.put_u8(self.target_system);
13790        __tmp.put_u8(self.target_component);
13791        __tmp.put_u8(self.gimbal_device_id);
13792        if matches!(version, MavlinkVersion::V2) {
13793            let len = __tmp.len();
13794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13795        } else {
13796            __tmp.len()
13797        }
13798    }
13799}
13800#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13801#[doc = ""]
13802#[doc = "ID: 287"]
13803#[derive(Debug, Clone, PartialEq)]
13804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13806#[cfg_attr(feature = "ts", derive(TS))]
13807#[cfg_attr(feature = "ts", ts(export))]
13808pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13809    #[doc = "High level gimbal manager flags to use."]
13810    pub flags: GimbalManagerFlags,
13811    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13812    pub pitch: f32,
13813    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13814    pub yaw: f32,
13815    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13816    pub pitch_rate: f32,
13817    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13818    pub yaw_rate: f32,
13819    #[doc = "System ID"]
13820    pub target_system: u8,
13821    #[doc = "Component ID"]
13822    pub target_component: u8,
13823    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13824    pub gimbal_device_id: u8,
13825}
13826impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13827    pub const ENCODED_LEN: usize = 23usize;
13828    pub const DEFAULT: Self = Self {
13829        flags: GimbalManagerFlags::DEFAULT,
13830        pitch: 0.0_f32,
13831        yaw: 0.0_f32,
13832        pitch_rate: 0.0_f32,
13833        yaw_rate: 0.0_f32,
13834        target_system: 0_u8,
13835        target_component: 0_u8,
13836        gimbal_device_id: 0_u8,
13837    };
13838    #[cfg(feature = "arbitrary")]
13839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13840        use arbitrary::{Arbitrary, Unstructured};
13841        let mut buf = [0u8; 1024];
13842        rng.fill_bytes(&mut buf);
13843        let mut unstructured = Unstructured::new(&buf);
13844        Self::arbitrary(&mut unstructured).unwrap_or_default()
13845    }
13846}
13847impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13848    fn default() -> Self {
13849        Self::DEFAULT.clone()
13850    }
13851}
13852impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13853    type Message = MavMessage;
13854    const ID: u32 = 287u32;
13855    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13856    const EXTRA_CRC: u8 = 1u8;
13857    const ENCODED_LEN: usize = 23usize;
13858    fn deser(
13859        _version: MavlinkVersion,
13860        __input: &[u8],
13861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13862        let avail_len = __input.len();
13863        let mut payload_buf = [0; Self::ENCODED_LEN];
13864        let mut buf = if avail_len < Self::ENCODED_LEN {
13865            payload_buf[0..avail_len].copy_from_slice(__input);
13866            Bytes::new(&payload_buf)
13867        } else {
13868            Bytes::new(__input)
13869        };
13870        let mut __struct = Self::default();
13871        let tmp = buf.get_u32_le();
13872        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13873            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13874                flag_type: "GimbalManagerFlags",
13875                value: tmp as u32,
13876            })?;
13877        __struct.pitch = buf.get_f32_le();
13878        __struct.yaw = buf.get_f32_le();
13879        __struct.pitch_rate = buf.get_f32_le();
13880        __struct.yaw_rate = buf.get_f32_le();
13881        __struct.target_system = buf.get_u8();
13882        __struct.target_component = buf.get_u8();
13883        __struct.gimbal_device_id = buf.get_u8();
13884        Ok(__struct)
13885    }
13886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13887        let mut __tmp = BytesMut::new(bytes);
13888        #[allow(clippy::absurd_extreme_comparisons)]
13889        #[allow(unused_comparisons)]
13890        if __tmp.remaining() < Self::ENCODED_LEN {
13891            panic!(
13892                "buffer is too small (need {} bytes, but got {})",
13893                Self::ENCODED_LEN,
13894                __tmp.remaining(),
13895            )
13896        }
13897        __tmp.put_u32_le(self.flags.bits());
13898        __tmp.put_f32_le(self.pitch);
13899        __tmp.put_f32_le(self.yaw);
13900        __tmp.put_f32_le(self.pitch_rate);
13901        __tmp.put_f32_le(self.yaw_rate);
13902        __tmp.put_u8(self.target_system);
13903        __tmp.put_u8(self.target_component);
13904        __tmp.put_u8(self.gimbal_device_id);
13905        if matches!(version, MavlinkVersion::V2) {
13906            let len = __tmp.len();
13907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13908        } else {
13909            __tmp.len()
13910        }
13911    }
13912}
13913#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13914#[doc = ""]
13915#[doc = "ID: 281"]
13916#[derive(Debug, Clone, PartialEq)]
13917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13919#[cfg_attr(feature = "ts", derive(TS))]
13920#[cfg_attr(feature = "ts", ts(export))]
13921pub struct GIMBAL_MANAGER_STATUS_DATA {
13922    #[doc = "Timestamp (time since system boot)."]
13923    pub time_boot_ms: u32,
13924    #[doc = "High level gimbal manager flags currently applied."]
13925    pub flags: GimbalManagerFlags,
13926    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13927    pub gimbal_device_id: u8,
13928    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13929    pub primary_control_sysid: u8,
13930    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13931    pub primary_control_compid: u8,
13932    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13933    pub secondary_control_sysid: u8,
13934    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13935    pub secondary_control_compid: u8,
13936}
13937impl GIMBAL_MANAGER_STATUS_DATA {
13938    pub const ENCODED_LEN: usize = 13usize;
13939    pub const DEFAULT: Self = Self {
13940        time_boot_ms: 0_u32,
13941        flags: GimbalManagerFlags::DEFAULT,
13942        gimbal_device_id: 0_u8,
13943        primary_control_sysid: 0_u8,
13944        primary_control_compid: 0_u8,
13945        secondary_control_sysid: 0_u8,
13946        secondary_control_compid: 0_u8,
13947    };
13948    #[cfg(feature = "arbitrary")]
13949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13950        use arbitrary::{Arbitrary, Unstructured};
13951        let mut buf = [0u8; 1024];
13952        rng.fill_bytes(&mut buf);
13953        let mut unstructured = Unstructured::new(&buf);
13954        Self::arbitrary(&mut unstructured).unwrap_or_default()
13955    }
13956}
13957impl Default for GIMBAL_MANAGER_STATUS_DATA {
13958    fn default() -> Self {
13959        Self::DEFAULT.clone()
13960    }
13961}
13962impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13963    type Message = MavMessage;
13964    const ID: u32 = 281u32;
13965    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13966    const EXTRA_CRC: u8 = 48u8;
13967    const ENCODED_LEN: usize = 13usize;
13968    fn deser(
13969        _version: MavlinkVersion,
13970        __input: &[u8],
13971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13972        let avail_len = __input.len();
13973        let mut payload_buf = [0; Self::ENCODED_LEN];
13974        let mut buf = if avail_len < Self::ENCODED_LEN {
13975            payload_buf[0..avail_len].copy_from_slice(__input);
13976            Bytes::new(&payload_buf)
13977        } else {
13978            Bytes::new(__input)
13979        };
13980        let mut __struct = Self::default();
13981        __struct.time_boot_ms = buf.get_u32_le();
13982        let tmp = buf.get_u32_le();
13983        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13984            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13985                flag_type: "GimbalManagerFlags",
13986                value: tmp as u32,
13987            })?;
13988        __struct.gimbal_device_id = buf.get_u8();
13989        __struct.primary_control_sysid = buf.get_u8();
13990        __struct.primary_control_compid = buf.get_u8();
13991        __struct.secondary_control_sysid = buf.get_u8();
13992        __struct.secondary_control_compid = buf.get_u8();
13993        Ok(__struct)
13994    }
13995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13996        let mut __tmp = BytesMut::new(bytes);
13997        #[allow(clippy::absurd_extreme_comparisons)]
13998        #[allow(unused_comparisons)]
13999        if __tmp.remaining() < Self::ENCODED_LEN {
14000            panic!(
14001                "buffer is too small (need {} bytes, but got {})",
14002                Self::ENCODED_LEN,
14003                __tmp.remaining(),
14004            )
14005        }
14006        __tmp.put_u32_le(self.time_boot_ms);
14007        __tmp.put_u32_le(self.flags.bits());
14008        __tmp.put_u8(self.gimbal_device_id);
14009        __tmp.put_u8(self.primary_control_sysid);
14010        __tmp.put_u8(self.primary_control_compid);
14011        __tmp.put_u8(self.secondary_control_sysid);
14012        __tmp.put_u8(self.secondary_control_compid);
14013        if matches!(version, MavlinkVersion::V2) {
14014            let len = __tmp.len();
14015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14016        } else {
14017            __tmp.len()
14018        }
14019    }
14020}
14021#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14022#[doc = ""]
14023#[doc = "ID: 33"]
14024#[derive(Debug, Clone, PartialEq)]
14025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14027#[cfg_attr(feature = "ts", derive(TS))]
14028#[cfg_attr(feature = "ts", ts(export))]
14029pub struct GLOBAL_POSITION_INT_DATA {
14030    #[doc = "Timestamp (time since system boot)."]
14031    pub time_boot_ms: u32,
14032    #[doc = "Latitude, expressed"]
14033    pub lat: i32,
14034    #[doc = "Longitude, expressed"]
14035    pub lon: i32,
14036    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14037    pub alt: i32,
14038    #[doc = "Altitude above home"]
14039    pub relative_alt: i32,
14040    #[doc = "Ground X Speed (Latitude, positive north)"]
14041    pub vx: i16,
14042    #[doc = "Ground Y Speed (Longitude, positive east)"]
14043    pub vy: i16,
14044    #[doc = "Ground Z Speed (Altitude, positive down)"]
14045    pub vz: i16,
14046    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14047    pub hdg: u16,
14048}
14049impl GLOBAL_POSITION_INT_DATA {
14050    pub const ENCODED_LEN: usize = 28usize;
14051    pub const DEFAULT: Self = Self {
14052        time_boot_ms: 0_u32,
14053        lat: 0_i32,
14054        lon: 0_i32,
14055        alt: 0_i32,
14056        relative_alt: 0_i32,
14057        vx: 0_i16,
14058        vy: 0_i16,
14059        vz: 0_i16,
14060        hdg: 0_u16,
14061    };
14062    #[cfg(feature = "arbitrary")]
14063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14064        use arbitrary::{Arbitrary, Unstructured};
14065        let mut buf = [0u8; 1024];
14066        rng.fill_bytes(&mut buf);
14067        let mut unstructured = Unstructured::new(&buf);
14068        Self::arbitrary(&mut unstructured).unwrap_or_default()
14069    }
14070}
14071impl Default for GLOBAL_POSITION_INT_DATA {
14072    fn default() -> Self {
14073        Self::DEFAULT.clone()
14074    }
14075}
14076impl MessageData for GLOBAL_POSITION_INT_DATA {
14077    type Message = MavMessage;
14078    const ID: u32 = 33u32;
14079    const NAME: &'static str = "GLOBAL_POSITION_INT";
14080    const EXTRA_CRC: u8 = 104u8;
14081    const ENCODED_LEN: usize = 28usize;
14082    fn deser(
14083        _version: MavlinkVersion,
14084        __input: &[u8],
14085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14086        let avail_len = __input.len();
14087        let mut payload_buf = [0; Self::ENCODED_LEN];
14088        let mut buf = if avail_len < Self::ENCODED_LEN {
14089            payload_buf[0..avail_len].copy_from_slice(__input);
14090            Bytes::new(&payload_buf)
14091        } else {
14092            Bytes::new(__input)
14093        };
14094        let mut __struct = Self::default();
14095        __struct.time_boot_ms = buf.get_u32_le();
14096        __struct.lat = buf.get_i32_le();
14097        __struct.lon = buf.get_i32_le();
14098        __struct.alt = buf.get_i32_le();
14099        __struct.relative_alt = buf.get_i32_le();
14100        __struct.vx = buf.get_i16_le();
14101        __struct.vy = buf.get_i16_le();
14102        __struct.vz = buf.get_i16_le();
14103        __struct.hdg = buf.get_u16_le();
14104        Ok(__struct)
14105    }
14106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14107        let mut __tmp = BytesMut::new(bytes);
14108        #[allow(clippy::absurd_extreme_comparisons)]
14109        #[allow(unused_comparisons)]
14110        if __tmp.remaining() < Self::ENCODED_LEN {
14111            panic!(
14112                "buffer is too small (need {} bytes, but got {})",
14113                Self::ENCODED_LEN,
14114                __tmp.remaining(),
14115            )
14116        }
14117        __tmp.put_u32_le(self.time_boot_ms);
14118        __tmp.put_i32_le(self.lat);
14119        __tmp.put_i32_le(self.lon);
14120        __tmp.put_i32_le(self.alt);
14121        __tmp.put_i32_le(self.relative_alt);
14122        __tmp.put_i16_le(self.vx);
14123        __tmp.put_i16_le(self.vy);
14124        __tmp.put_i16_le(self.vz);
14125        __tmp.put_u16_le(self.hdg);
14126        if matches!(version, MavlinkVersion::V2) {
14127            let len = __tmp.len();
14128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14129        } else {
14130            __tmp.len()
14131        }
14132    }
14133}
14134#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14135#[doc = ""]
14136#[doc = "ID: 63"]
14137#[derive(Debug, Clone, PartialEq)]
14138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14140#[cfg_attr(feature = "ts", derive(TS))]
14141#[cfg_attr(feature = "ts", ts(export))]
14142pub struct GLOBAL_POSITION_INT_COV_DATA {
14143    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14144    pub time_usec: u64,
14145    #[doc = "Latitude"]
14146    pub lat: i32,
14147    #[doc = "Longitude"]
14148    pub lon: i32,
14149    #[doc = "Altitude in meters above MSL"]
14150    pub alt: i32,
14151    #[doc = "Altitude above ground"]
14152    pub relative_alt: i32,
14153    #[doc = "Ground X Speed (Latitude)"]
14154    pub vx: f32,
14155    #[doc = "Ground Y Speed (Longitude)"]
14156    pub vy: f32,
14157    #[doc = "Ground Z Speed (Altitude)"]
14158    pub vz: f32,
14159    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14162    pub covariance: [f32; 36],
14163    #[doc = "Class id of the estimator this estimate originated from."]
14164    pub estimator_type: MavEstimatorType,
14165}
14166impl GLOBAL_POSITION_INT_COV_DATA {
14167    pub const ENCODED_LEN: usize = 181usize;
14168    pub const DEFAULT: Self = Self {
14169        time_usec: 0_u64,
14170        lat: 0_i32,
14171        lon: 0_i32,
14172        alt: 0_i32,
14173        relative_alt: 0_i32,
14174        vx: 0.0_f32,
14175        vy: 0.0_f32,
14176        vz: 0.0_f32,
14177        covariance: [0.0_f32; 36usize],
14178        estimator_type: MavEstimatorType::DEFAULT,
14179    };
14180    #[cfg(feature = "arbitrary")]
14181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14182        use arbitrary::{Arbitrary, Unstructured};
14183        let mut buf = [0u8; 1024];
14184        rng.fill_bytes(&mut buf);
14185        let mut unstructured = Unstructured::new(&buf);
14186        Self::arbitrary(&mut unstructured).unwrap_or_default()
14187    }
14188}
14189impl Default for GLOBAL_POSITION_INT_COV_DATA {
14190    fn default() -> Self {
14191        Self::DEFAULT.clone()
14192    }
14193}
14194impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14195    type Message = MavMessage;
14196    const ID: u32 = 63u32;
14197    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14198    const EXTRA_CRC: u8 = 119u8;
14199    const ENCODED_LEN: usize = 181usize;
14200    fn deser(
14201        _version: MavlinkVersion,
14202        __input: &[u8],
14203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14204        let avail_len = __input.len();
14205        let mut payload_buf = [0; Self::ENCODED_LEN];
14206        let mut buf = if avail_len < Self::ENCODED_LEN {
14207            payload_buf[0..avail_len].copy_from_slice(__input);
14208            Bytes::new(&payload_buf)
14209        } else {
14210            Bytes::new(__input)
14211        };
14212        let mut __struct = Self::default();
14213        __struct.time_usec = buf.get_u64_le();
14214        __struct.lat = buf.get_i32_le();
14215        __struct.lon = buf.get_i32_le();
14216        __struct.alt = buf.get_i32_le();
14217        __struct.relative_alt = buf.get_i32_le();
14218        __struct.vx = buf.get_f32_le();
14219        __struct.vy = buf.get_f32_le();
14220        __struct.vz = buf.get_f32_le();
14221        for v in &mut __struct.covariance {
14222            let val = buf.get_f32_le();
14223            *v = val;
14224        }
14225        let tmp = buf.get_u8();
14226        __struct.estimator_type =
14227            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14228                enum_type: "MavEstimatorType",
14229                value: tmp as u32,
14230            })?;
14231        Ok(__struct)
14232    }
14233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14234        let mut __tmp = BytesMut::new(bytes);
14235        #[allow(clippy::absurd_extreme_comparisons)]
14236        #[allow(unused_comparisons)]
14237        if __tmp.remaining() < Self::ENCODED_LEN {
14238            panic!(
14239                "buffer is too small (need {} bytes, but got {})",
14240                Self::ENCODED_LEN,
14241                __tmp.remaining(),
14242            )
14243        }
14244        __tmp.put_u64_le(self.time_usec);
14245        __tmp.put_i32_le(self.lat);
14246        __tmp.put_i32_le(self.lon);
14247        __tmp.put_i32_le(self.alt);
14248        __tmp.put_i32_le(self.relative_alt);
14249        __tmp.put_f32_le(self.vx);
14250        __tmp.put_f32_le(self.vy);
14251        __tmp.put_f32_le(self.vz);
14252        for val in &self.covariance {
14253            __tmp.put_f32_le(*val);
14254        }
14255        __tmp.put_u8(self.estimator_type as u8);
14256        if matches!(version, MavlinkVersion::V2) {
14257            let len = __tmp.len();
14258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14259        } else {
14260            __tmp.len()
14261        }
14262    }
14263}
14264#[doc = "Global position/attitude estimate from a vision source."]
14265#[doc = ""]
14266#[doc = "ID: 101"]
14267#[derive(Debug, Clone, PartialEq)]
14268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14270#[cfg_attr(feature = "ts", derive(TS))]
14271#[cfg_attr(feature = "ts", ts(export))]
14272pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14273    #[doc = "Timestamp (UNIX time or since system boot)"]
14274    pub usec: u64,
14275    #[doc = "Global X position"]
14276    pub x: f32,
14277    #[doc = "Global Y position"]
14278    pub y: f32,
14279    #[doc = "Global Z position"]
14280    pub z: f32,
14281    #[doc = "Roll angle"]
14282    pub roll: f32,
14283    #[doc = "Pitch angle"]
14284    pub pitch: f32,
14285    #[doc = "Yaw angle"]
14286    pub yaw: f32,
14287    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14288    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14289    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14290    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14291    pub covariance: [f32; 21],
14292    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14293    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14294    pub reset_counter: u8,
14295}
14296impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14297    pub const ENCODED_LEN: usize = 117usize;
14298    pub const DEFAULT: Self = Self {
14299        usec: 0_u64,
14300        x: 0.0_f32,
14301        y: 0.0_f32,
14302        z: 0.0_f32,
14303        roll: 0.0_f32,
14304        pitch: 0.0_f32,
14305        yaw: 0.0_f32,
14306        covariance: [0.0_f32; 21usize],
14307        reset_counter: 0_u8,
14308    };
14309    #[cfg(feature = "arbitrary")]
14310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14311        use arbitrary::{Arbitrary, Unstructured};
14312        let mut buf = [0u8; 1024];
14313        rng.fill_bytes(&mut buf);
14314        let mut unstructured = Unstructured::new(&buf);
14315        Self::arbitrary(&mut unstructured).unwrap_or_default()
14316    }
14317}
14318impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14319    fn default() -> Self {
14320        Self::DEFAULT.clone()
14321    }
14322}
14323impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14324    type Message = MavMessage;
14325    const ID: u32 = 101u32;
14326    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14327    const EXTRA_CRC: u8 = 102u8;
14328    const ENCODED_LEN: usize = 117usize;
14329    fn deser(
14330        _version: MavlinkVersion,
14331        __input: &[u8],
14332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14333        let avail_len = __input.len();
14334        let mut payload_buf = [0; Self::ENCODED_LEN];
14335        let mut buf = if avail_len < Self::ENCODED_LEN {
14336            payload_buf[0..avail_len].copy_from_slice(__input);
14337            Bytes::new(&payload_buf)
14338        } else {
14339            Bytes::new(__input)
14340        };
14341        let mut __struct = Self::default();
14342        __struct.usec = buf.get_u64_le();
14343        __struct.x = buf.get_f32_le();
14344        __struct.y = buf.get_f32_le();
14345        __struct.z = buf.get_f32_le();
14346        __struct.roll = buf.get_f32_le();
14347        __struct.pitch = buf.get_f32_le();
14348        __struct.yaw = buf.get_f32_le();
14349        for v in &mut __struct.covariance {
14350            let val = buf.get_f32_le();
14351            *v = val;
14352        }
14353        __struct.reset_counter = buf.get_u8();
14354        Ok(__struct)
14355    }
14356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14357        let mut __tmp = BytesMut::new(bytes);
14358        #[allow(clippy::absurd_extreme_comparisons)]
14359        #[allow(unused_comparisons)]
14360        if __tmp.remaining() < Self::ENCODED_LEN {
14361            panic!(
14362                "buffer is too small (need {} bytes, but got {})",
14363                Self::ENCODED_LEN,
14364                __tmp.remaining(),
14365            )
14366        }
14367        __tmp.put_u64_le(self.usec);
14368        __tmp.put_f32_le(self.x);
14369        __tmp.put_f32_le(self.y);
14370        __tmp.put_f32_le(self.z);
14371        __tmp.put_f32_le(self.roll);
14372        __tmp.put_f32_le(self.pitch);
14373        __tmp.put_f32_le(self.yaw);
14374        if matches!(version, MavlinkVersion::V2) {
14375            for val in &self.covariance {
14376                __tmp.put_f32_le(*val);
14377            }
14378            __tmp.put_u8(self.reset_counter);
14379            let len = __tmp.len();
14380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14381        } else {
14382            __tmp.len()
14383        }
14384    }
14385}
14386#[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
14387#[doc = ""]
14388#[doc = "ID: 441"]
14389#[derive(Debug, Clone, PartialEq)]
14390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14392#[cfg_attr(feature = "ts", derive(TS))]
14393#[cfg_attr(feature = "ts", ts(export))]
14394pub struct GNSS_INTEGRITY_DATA {
14395    #[doc = "Errors in the GPS system."]
14396    pub system_errors: GpsSystemErrorFlags,
14397    #[doc = "Horizontal expected accuracy using satellites successfully validated using RAIM."]
14398    pub raim_hfom: u16,
14399    #[doc = "Vertical expected accuracy using satellites successfully validated using RAIM."]
14400    pub raim_vfom: u16,
14401    #[doc = "GNSS receiver id. Must match instance ids of other messages from same receiver."]
14402    pub id: u8,
14403    #[doc = "Signal authentication state of the GPS system."]
14404    pub authentication_state: GpsAuthenticationState,
14405    #[doc = "Signal jamming state of the GPS system."]
14406    pub jamming_state: GpsJammingState,
14407    #[doc = "Signal spoofing state of the GPS system."]
14408    pub spoofing_state: GpsSpoofingState,
14409    #[doc = "The state of the RAIM processing."]
14410    pub raim_state: GpsRaimState,
14411    #[doc = "An abstract value representing the estimated quality of incoming corrections, or 255 if not available."]
14412    pub corrections_quality: u8,
14413    #[doc = "An abstract value representing the overall status of the receiver, or 255 if not available."]
14414    pub system_status_summary: u8,
14415    #[doc = "An abstract value representing the quality of incoming GNSS signals, or 255 if not available."]
14416    pub gnss_signal_quality: u8,
14417    #[doc = "An abstract value representing the estimated PPK quality, or 255 if not available."]
14418    pub post_processing_quality: u8,
14419}
14420impl GNSS_INTEGRITY_DATA {
14421    pub const ENCODED_LEN: usize = 17usize;
14422    pub const DEFAULT: Self = Self {
14423        system_errors: GpsSystemErrorFlags::DEFAULT,
14424        raim_hfom: 0_u16,
14425        raim_vfom: 0_u16,
14426        id: 0_u8,
14427        authentication_state: GpsAuthenticationState::DEFAULT,
14428        jamming_state: GpsJammingState::DEFAULT,
14429        spoofing_state: GpsSpoofingState::DEFAULT,
14430        raim_state: GpsRaimState::DEFAULT,
14431        corrections_quality: 0_u8,
14432        system_status_summary: 0_u8,
14433        gnss_signal_quality: 0_u8,
14434        post_processing_quality: 0_u8,
14435    };
14436    #[cfg(feature = "arbitrary")]
14437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14438        use arbitrary::{Arbitrary, Unstructured};
14439        let mut buf = [0u8; 1024];
14440        rng.fill_bytes(&mut buf);
14441        let mut unstructured = Unstructured::new(&buf);
14442        Self::arbitrary(&mut unstructured).unwrap_or_default()
14443    }
14444}
14445impl Default for GNSS_INTEGRITY_DATA {
14446    fn default() -> Self {
14447        Self::DEFAULT.clone()
14448    }
14449}
14450impl MessageData for GNSS_INTEGRITY_DATA {
14451    type Message = MavMessage;
14452    const ID: u32 = 441u32;
14453    const NAME: &'static str = "GNSS_INTEGRITY";
14454    const EXTRA_CRC: u8 = 169u8;
14455    const ENCODED_LEN: usize = 17usize;
14456    fn deser(
14457        _version: MavlinkVersion,
14458        __input: &[u8],
14459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14460        let avail_len = __input.len();
14461        let mut payload_buf = [0; Self::ENCODED_LEN];
14462        let mut buf = if avail_len < Self::ENCODED_LEN {
14463            payload_buf[0..avail_len].copy_from_slice(__input);
14464            Bytes::new(&payload_buf)
14465        } else {
14466            Bytes::new(__input)
14467        };
14468        let mut __struct = Self::default();
14469        let tmp = buf.get_u32_le();
14470        __struct.system_errors = GpsSystemErrorFlags::from_bits(
14471            tmp & GpsSystemErrorFlags::all().bits(),
14472        )
14473        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14474            flag_type: "GpsSystemErrorFlags",
14475            value: tmp as u32,
14476        })?;
14477        __struct.raim_hfom = buf.get_u16_le();
14478        __struct.raim_vfom = buf.get_u16_le();
14479        __struct.id = buf.get_u8();
14480        let tmp = buf.get_u8();
14481        __struct.authentication_state =
14482            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14483                enum_type: "GpsAuthenticationState",
14484                value: tmp as u32,
14485            })?;
14486        let tmp = buf.get_u8();
14487        __struct.jamming_state =
14488            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14489                enum_type: "GpsJammingState",
14490                value: tmp as u32,
14491            })?;
14492        let tmp = buf.get_u8();
14493        __struct.spoofing_state =
14494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14495                enum_type: "GpsSpoofingState",
14496                value: tmp as u32,
14497            })?;
14498        let tmp = buf.get_u8();
14499        __struct.raim_state =
14500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14501                enum_type: "GpsRaimState",
14502                value: tmp as u32,
14503            })?;
14504        __struct.corrections_quality = buf.get_u8();
14505        __struct.system_status_summary = buf.get_u8();
14506        __struct.gnss_signal_quality = buf.get_u8();
14507        __struct.post_processing_quality = buf.get_u8();
14508        Ok(__struct)
14509    }
14510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14511        let mut __tmp = BytesMut::new(bytes);
14512        #[allow(clippy::absurd_extreme_comparisons)]
14513        #[allow(unused_comparisons)]
14514        if __tmp.remaining() < Self::ENCODED_LEN {
14515            panic!(
14516                "buffer is too small (need {} bytes, but got {})",
14517                Self::ENCODED_LEN,
14518                __tmp.remaining(),
14519            )
14520        }
14521        __tmp.put_u32_le(self.system_errors.bits());
14522        __tmp.put_u16_le(self.raim_hfom);
14523        __tmp.put_u16_le(self.raim_vfom);
14524        __tmp.put_u8(self.id);
14525        __tmp.put_u8(self.authentication_state as u8);
14526        __tmp.put_u8(self.jamming_state as u8);
14527        __tmp.put_u8(self.spoofing_state as u8);
14528        __tmp.put_u8(self.raim_state as u8);
14529        __tmp.put_u8(self.corrections_quality);
14530        __tmp.put_u8(self.system_status_summary);
14531        __tmp.put_u8(self.gnss_signal_quality);
14532        __tmp.put_u8(self.post_processing_quality);
14533        if matches!(version, MavlinkVersion::V2) {
14534            let len = __tmp.len();
14535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14536        } else {
14537            __tmp.len()
14538        }
14539    }
14540}
14541#[doc = "Second GPS data."]
14542#[doc = ""]
14543#[doc = "ID: 124"]
14544#[derive(Debug, Clone, PartialEq)]
14545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14547#[cfg_attr(feature = "ts", derive(TS))]
14548#[cfg_attr(feature = "ts", ts(export))]
14549pub struct GPS2_RAW_DATA {
14550    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14551    pub time_usec: u64,
14552    #[doc = "Latitude (WGS84)"]
14553    pub lat: i32,
14554    #[doc = "Longitude (WGS84)"]
14555    pub lon: i32,
14556    #[doc = "Altitude (MSL). Positive for up."]
14557    pub alt: i32,
14558    #[doc = "Age of DGPS info"]
14559    pub dgps_age: u32,
14560    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14561    pub eph: u16,
14562    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14563    pub epv: u16,
14564    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14565    pub vel: u16,
14566    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14567    pub cog: u16,
14568    #[doc = "GPS fix type."]
14569    pub fix_type: GpsFixType,
14570    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14571    pub satellites_visible: u8,
14572    #[doc = "Number of DGPS satellites"]
14573    pub dgps_numch: u8,
14574    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14576    pub yaw: u16,
14577    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14578    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14579    pub alt_ellipsoid: i32,
14580    #[doc = "Position uncertainty."]
14581    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14582    pub h_acc: u32,
14583    #[doc = "Altitude uncertainty."]
14584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14585    pub v_acc: u32,
14586    #[doc = "Speed uncertainty."]
14587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14588    pub vel_acc: u32,
14589    #[doc = "Heading / track uncertainty"]
14590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14591    pub hdg_acc: u32,
14592}
14593impl GPS2_RAW_DATA {
14594    pub const ENCODED_LEN: usize = 57usize;
14595    pub const DEFAULT: Self = Self {
14596        time_usec: 0_u64,
14597        lat: 0_i32,
14598        lon: 0_i32,
14599        alt: 0_i32,
14600        dgps_age: 0_u32,
14601        eph: 0_u16,
14602        epv: 0_u16,
14603        vel: 0_u16,
14604        cog: 0_u16,
14605        fix_type: GpsFixType::DEFAULT,
14606        satellites_visible: 0_u8,
14607        dgps_numch: 0_u8,
14608        yaw: 0_u16,
14609        alt_ellipsoid: 0_i32,
14610        h_acc: 0_u32,
14611        v_acc: 0_u32,
14612        vel_acc: 0_u32,
14613        hdg_acc: 0_u32,
14614    };
14615    #[cfg(feature = "arbitrary")]
14616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14617        use arbitrary::{Arbitrary, Unstructured};
14618        let mut buf = [0u8; 1024];
14619        rng.fill_bytes(&mut buf);
14620        let mut unstructured = Unstructured::new(&buf);
14621        Self::arbitrary(&mut unstructured).unwrap_or_default()
14622    }
14623}
14624impl Default for GPS2_RAW_DATA {
14625    fn default() -> Self {
14626        Self::DEFAULT.clone()
14627    }
14628}
14629impl MessageData for GPS2_RAW_DATA {
14630    type Message = MavMessage;
14631    const ID: u32 = 124u32;
14632    const NAME: &'static str = "GPS2_RAW";
14633    const EXTRA_CRC: u8 = 87u8;
14634    const ENCODED_LEN: usize = 57usize;
14635    fn deser(
14636        _version: MavlinkVersion,
14637        __input: &[u8],
14638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14639        let avail_len = __input.len();
14640        let mut payload_buf = [0; Self::ENCODED_LEN];
14641        let mut buf = if avail_len < Self::ENCODED_LEN {
14642            payload_buf[0..avail_len].copy_from_slice(__input);
14643            Bytes::new(&payload_buf)
14644        } else {
14645            Bytes::new(__input)
14646        };
14647        let mut __struct = Self::default();
14648        __struct.time_usec = buf.get_u64_le();
14649        __struct.lat = buf.get_i32_le();
14650        __struct.lon = buf.get_i32_le();
14651        __struct.alt = buf.get_i32_le();
14652        __struct.dgps_age = buf.get_u32_le();
14653        __struct.eph = buf.get_u16_le();
14654        __struct.epv = buf.get_u16_le();
14655        __struct.vel = buf.get_u16_le();
14656        __struct.cog = buf.get_u16_le();
14657        let tmp = buf.get_u8();
14658        __struct.fix_type =
14659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14660                enum_type: "GpsFixType",
14661                value: tmp as u32,
14662            })?;
14663        __struct.satellites_visible = buf.get_u8();
14664        __struct.dgps_numch = buf.get_u8();
14665        __struct.yaw = buf.get_u16_le();
14666        __struct.alt_ellipsoid = buf.get_i32_le();
14667        __struct.h_acc = buf.get_u32_le();
14668        __struct.v_acc = buf.get_u32_le();
14669        __struct.vel_acc = buf.get_u32_le();
14670        __struct.hdg_acc = buf.get_u32_le();
14671        Ok(__struct)
14672    }
14673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14674        let mut __tmp = BytesMut::new(bytes);
14675        #[allow(clippy::absurd_extreme_comparisons)]
14676        #[allow(unused_comparisons)]
14677        if __tmp.remaining() < Self::ENCODED_LEN {
14678            panic!(
14679                "buffer is too small (need {} bytes, but got {})",
14680                Self::ENCODED_LEN,
14681                __tmp.remaining(),
14682            )
14683        }
14684        __tmp.put_u64_le(self.time_usec);
14685        __tmp.put_i32_le(self.lat);
14686        __tmp.put_i32_le(self.lon);
14687        __tmp.put_i32_le(self.alt);
14688        __tmp.put_u32_le(self.dgps_age);
14689        __tmp.put_u16_le(self.eph);
14690        __tmp.put_u16_le(self.epv);
14691        __tmp.put_u16_le(self.vel);
14692        __tmp.put_u16_le(self.cog);
14693        __tmp.put_u8(self.fix_type as u8);
14694        __tmp.put_u8(self.satellites_visible);
14695        __tmp.put_u8(self.dgps_numch);
14696        if matches!(version, MavlinkVersion::V2) {
14697            __tmp.put_u16_le(self.yaw);
14698            __tmp.put_i32_le(self.alt_ellipsoid);
14699            __tmp.put_u32_le(self.h_acc);
14700            __tmp.put_u32_le(self.v_acc);
14701            __tmp.put_u32_le(self.vel_acc);
14702            __tmp.put_u32_le(self.hdg_acc);
14703            let len = __tmp.len();
14704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14705        } else {
14706            __tmp.len()
14707        }
14708    }
14709}
14710#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14711#[doc = ""]
14712#[doc = "ID: 128"]
14713#[derive(Debug, Clone, PartialEq)]
14714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14716#[cfg_attr(feature = "ts", derive(TS))]
14717#[cfg_attr(feature = "ts", ts(export))]
14718pub struct GPS2_RTK_DATA {
14719    #[doc = "Time since boot of last baseline message received."]
14720    pub time_last_baseline_ms: u32,
14721    #[doc = "GPS Time of Week of last baseline"]
14722    pub tow: u32,
14723    #[doc = "Current baseline in ECEF x or NED north component."]
14724    pub baseline_a_mm: i32,
14725    #[doc = "Current baseline in ECEF y or NED east component."]
14726    pub baseline_b_mm: i32,
14727    #[doc = "Current baseline in ECEF z or NED down component."]
14728    pub baseline_c_mm: i32,
14729    #[doc = "Current estimate of baseline accuracy."]
14730    pub accuracy: u32,
14731    #[doc = "Current number of integer ambiguity hypotheses."]
14732    pub iar_num_hypotheses: i32,
14733    #[doc = "GPS Week Number of last baseline"]
14734    pub wn: u16,
14735    #[doc = "Identification of connected RTK receiver."]
14736    pub rtk_receiver_id: u8,
14737    #[doc = "GPS-specific health report for RTK data."]
14738    pub rtk_health: u8,
14739    #[doc = "Rate of baseline messages being received by GPS"]
14740    pub rtk_rate: u8,
14741    #[doc = "Current number of sats used for RTK calculation."]
14742    pub nsats: u8,
14743    #[doc = "Coordinate system of baseline"]
14744    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14745}
14746impl GPS2_RTK_DATA {
14747    pub const ENCODED_LEN: usize = 35usize;
14748    pub const DEFAULT: Self = Self {
14749        time_last_baseline_ms: 0_u32,
14750        tow: 0_u32,
14751        baseline_a_mm: 0_i32,
14752        baseline_b_mm: 0_i32,
14753        baseline_c_mm: 0_i32,
14754        accuracy: 0_u32,
14755        iar_num_hypotheses: 0_i32,
14756        wn: 0_u16,
14757        rtk_receiver_id: 0_u8,
14758        rtk_health: 0_u8,
14759        rtk_rate: 0_u8,
14760        nsats: 0_u8,
14761        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14762    };
14763    #[cfg(feature = "arbitrary")]
14764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14765        use arbitrary::{Arbitrary, Unstructured};
14766        let mut buf = [0u8; 1024];
14767        rng.fill_bytes(&mut buf);
14768        let mut unstructured = Unstructured::new(&buf);
14769        Self::arbitrary(&mut unstructured).unwrap_or_default()
14770    }
14771}
14772impl Default for GPS2_RTK_DATA {
14773    fn default() -> Self {
14774        Self::DEFAULT.clone()
14775    }
14776}
14777impl MessageData for GPS2_RTK_DATA {
14778    type Message = MavMessage;
14779    const ID: u32 = 128u32;
14780    const NAME: &'static str = "GPS2_RTK";
14781    const EXTRA_CRC: u8 = 226u8;
14782    const ENCODED_LEN: usize = 35usize;
14783    fn deser(
14784        _version: MavlinkVersion,
14785        __input: &[u8],
14786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14787        let avail_len = __input.len();
14788        let mut payload_buf = [0; Self::ENCODED_LEN];
14789        let mut buf = if avail_len < Self::ENCODED_LEN {
14790            payload_buf[0..avail_len].copy_from_slice(__input);
14791            Bytes::new(&payload_buf)
14792        } else {
14793            Bytes::new(__input)
14794        };
14795        let mut __struct = Self::default();
14796        __struct.time_last_baseline_ms = buf.get_u32_le();
14797        __struct.tow = buf.get_u32_le();
14798        __struct.baseline_a_mm = buf.get_i32_le();
14799        __struct.baseline_b_mm = buf.get_i32_le();
14800        __struct.baseline_c_mm = buf.get_i32_le();
14801        __struct.accuracy = buf.get_u32_le();
14802        __struct.iar_num_hypotheses = buf.get_i32_le();
14803        __struct.wn = buf.get_u16_le();
14804        __struct.rtk_receiver_id = buf.get_u8();
14805        __struct.rtk_health = buf.get_u8();
14806        __struct.rtk_rate = buf.get_u8();
14807        __struct.nsats = buf.get_u8();
14808        let tmp = buf.get_u8();
14809        __struct.baseline_coords_type =
14810            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14811                enum_type: "RtkBaselineCoordinateSystem",
14812                value: tmp as u32,
14813            })?;
14814        Ok(__struct)
14815    }
14816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14817        let mut __tmp = BytesMut::new(bytes);
14818        #[allow(clippy::absurd_extreme_comparisons)]
14819        #[allow(unused_comparisons)]
14820        if __tmp.remaining() < Self::ENCODED_LEN {
14821            panic!(
14822                "buffer is too small (need {} bytes, but got {})",
14823                Self::ENCODED_LEN,
14824                __tmp.remaining(),
14825            )
14826        }
14827        __tmp.put_u32_le(self.time_last_baseline_ms);
14828        __tmp.put_u32_le(self.tow);
14829        __tmp.put_i32_le(self.baseline_a_mm);
14830        __tmp.put_i32_le(self.baseline_b_mm);
14831        __tmp.put_i32_le(self.baseline_c_mm);
14832        __tmp.put_u32_le(self.accuracy);
14833        __tmp.put_i32_le(self.iar_num_hypotheses);
14834        __tmp.put_u16_le(self.wn);
14835        __tmp.put_u8(self.rtk_receiver_id);
14836        __tmp.put_u8(self.rtk_health);
14837        __tmp.put_u8(self.rtk_rate);
14838        __tmp.put_u8(self.nsats);
14839        __tmp.put_u8(self.baseline_coords_type as u8);
14840        if matches!(version, MavlinkVersion::V2) {
14841            let len = __tmp.len();
14842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14843        } else {
14844            __tmp.len()
14845        }
14846    }
14847}
14848#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14849#[doc = ""]
14850#[doc = "ID: 49"]
14851#[derive(Debug, Clone, PartialEq)]
14852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14854#[cfg_attr(feature = "ts", derive(TS))]
14855#[cfg_attr(feature = "ts", ts(export))]
14856pub struct GPS_GLOBAL_ORIGIN_DATA {
14857    #[doc = "Latitude (WGS84)"]
14858    pub latitude: i32,
14859    #[doc = "Longitude (WGS84)"]
14860    pub longitude: i32,
14861    #[doc = "Altitude (MSL). Positive for up."]
14862    pub altitude: i32,
14863    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14864    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14865    pub time_usec: u64,
14866}
14867impl GPS_GLOBAL_ORIGIN_DATA {
14868    pub const ENCODED_LEN: usize = 20usize;
14869    pub const DEFAULT: Self = Self {
14870        latitude: 0_i32,
14871        longitude: 0_i32,
14872        altitude: 0_i32,
14873        time_usec: 0_u64,
14874    };
14875    #[cfg(feature = "arbitrary")]
14876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14877        use arbitrary::{Arbitrary, Unstructured};
14878        let mut buf = [0u8; 1024];
14879        rng.fill_bytes(&mut buf);
14880        let mut unstructured = Unstructured::new(&buf);
14881        Self::arbitrary(&mut unstructured).unwrap_or_default()
14882    }
14883}
14884impl Default for GPS_GLOBAL_ORIGIN_DATA {
14885    fn default() -> Self {
14886        Self::DEFAULT.clone()
14887    }
14888}
14889impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14890    type Message = MavMessage;
14891    const ID: u32 = 49u32;
14892    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14893    const EXTRA_CRC: u8 = 39u8;
14894    const ENCODED_LEN: usize = 20usize;
14895    fn deser(
14896        _version: MavlinkVersion,
14897        __input: &[u8],
14898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14899        let avail_len = __input.len();
14900        let mut payload_buf = [0; Self::ENCODED_LEN];
14901        let mut buf = if avail_len < Self::ENCODED_LEN {
14902            payload_buf[0..avail_len].copy_from_slice(__input);
14903            Bytes::new(&payload_buf)
14904        } else {
14905            Bytes::new(__input)
14906        };
14907        let mut __struct = Self::default();
14908        __struct.latitude = buf.get_i32_le();
14909        __struct.longitude = buf.get_i32_le();
14910        __struct.altitude = buf.get_i32_le();
14911        __struct.time_usec = buf.get_u64_le();
14912        Ok(__struct)
14913    }
14914    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14915        let mut __tmp = BytesMut::new(bytes);
14916        #[allow(clippy::absurd_extreme_comparisons)]
14917        #[allow(unused_comparisons)]
14918        if __tmp.remaining() < Self::ENCODED_LEN {
14919            panic!(
14920                "buffer is too small (need {} bytes, but got {})",
14921                Self::ENCODED_LEN,
14922                __tmp.remaining(),
14923            )
14924        }
14925        __tmp.put_i32_le(self.latitude);
14926        __tmp.put_i32_le(self.longitude);
14927        __tmp.put_i32_le(self.altitude);
14928        if matches!(version, MavlinkVersion::V2) {
14929            __tmp.put_u64_le(self.time_usec);
14930            let len = __tmp.len();
14931            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14932        } else {
14933            __tmp.len()
14934        }
14935    }
14936}
14937#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14938#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14939#[doc = ""]
14940#[doc = "ID: 123"]
14941#[derive(Debug, Clone, PartialEq)]
14942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14944#[cfg_attr(feature = "ts", derive(TS))]
14945#[cfg_attr(feature = "ts", ts(export))]
14946pub struct GPS_INJECT_DATA_DATA {
14947    #[doc = "System ID"]
14948    pub target_system: u8,
14949    #[doc = "Component ID"]
14950    pub target_component: u8,
14951    #[doc = "Data length"]
14952    pub len: u8,
14953    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14956    pub data: [u8; 110],
14957}
14958impl GPS_INJECT_DATA_DATA {
14959    pub const ENCODED_LEN: usize = 113usize;
14960    pub const DEFAULT: Self = Self {
14961        target_system: 0_u8,
14962        target_component: 0_u8,
14963        len: 0_u8,
14964        data: [0_u8; 110usize],
14965    };
14966    #[cfg(feature = "arbitrary")]
14967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14968        use arbitrary::{Arbitrary, Unstructured};
14969        let mut buf = [0u8; 1024];
14970        rng.fill_bytes(&mut buf);
14971        let mut unstructured = Unstructured::new(&buf);
14972        Self::arbitrary(&mut unstructured).unwrap_or_default()
14973    }
14974}
14975impl Default for GPS_INJECT_DATA_DATA {
14976    fn default() -> Self {
14977        Self::DEFAULT.clone()
14978    }
14979}
14980impl MessageData for GPS_INJECT_DATA_DATA {
14981    type Message = MavMessage;
14982    const ID: u32 = 123u32;
14983    const NAME: &'static str = "GPS_INJECT_DATA";
14984    const EXTRA_CRC: u8 = 250u8;
14985    const ENCODED_LEN: usize = 113usize;
14986    fn deser(
14987        _version: MavlinkVersion,
14988        __input: &[u8],
14989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14990        let avail_len = __input.len();
14991        let mut payload_buf = [0; Self::ENCODED_LEN];
14992        let mut buf = if avail_len < Self::ENCODED_LEN {
14993            payload_buf[0..avail_len].copy_from_slice(__input);
14994            Bytes::new(&payload_buf)
14995        } else {
14996            Bytes::new(__input)
14997        };
14998        let mut __struct = Self::default();
14999        __struct.target_system = buf.get_u8();
15000        __struct.target_component = buf.get_u8();
15001        __struct.len = buf.get_u8();
15002        for v in &mut __struct.data {
15003            let val = buf.get_u8();
15004            *v = val;
15005        }
15006        Ok(__struct)
15007    }
15008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15009        let mut __tmp = BytesMut::new(bytes);
15010        #[allow(clippy::absurd_extreme_comparisons)]
15011        #[allow(unused_comparisons)]
15012        if __tmp.remaining() < Self::ENCODED_LEN {
15013            panic!(
15014                "buffer is too small (need {} bytes, but got {})",
15015                Self::ENCODED_LEN,
15016                __tmp.remaining(),
15017            )
15018        }
15019        __tmp.put_u8(self.target_system);
15020        __tmp.put_u8(self.target_component);
15021        __tmp.put_u8(self.len);
15022        for val in &self.data {
15023            __tmp.put_u8(*val);
15024        }
15025        if matches!(version, MavlinkVersion::V2) {
15026            let len = __tmp.len();
15027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15028        } else {
15029            __tmp.len()
15030        }
15031    }
15032}
15033#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15034#[doc = ""]
15035#[doc = "ID: 232"]
15036#[derive(Debug, Clone, PartialEq)]
15037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15039#[cfg_attr(feature = "ts", derive(TS))]
15040#[cfg_attr(feature = "ts", ts(export))]
15041pub struct GPS_INPUT_DATA {
15042    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15043    pub time_usec: u64,
15044    #[doc = "GPS time (from start of GPS week)"]
15045    pub time_week_ms: u32,
15046    #[doc = "Latitude (WGS84)"]
15047    pub lat: i32,
15048    #[doc = "Longitude (WGS84)"]
15049    pub lon: i32,
15050    #[doc = "Altitude (MSL). Positive for up."]
15051    pub alt: f32,
15052    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15053    pub hdop: f32,
15054    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15055    pub vdop: f32,
15056    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15057    pub vn: f32,
15058    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15059    pub ve: f32,
15060    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15061    pub vd: f32,
15062    #[doc = "GPS speed accuracy"]
15063    pub speed_accuracy: f32,
15064    #[doc = "GPS horizontal accuracy"]
15065    pub horiz_accuracy: f32,
15066    #[doc = "GPS vertical accuracy"]
15067    pub vert_accuracy: f32,
15068    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15069    pub ignore_flags: GpsInputIgnoreFlags,
15070    #[doc = "GPS week number"]
15071    pub time_week: u16,
15072    #[doc = "ID of the GPS for multiple GPS inputs"]
15073    pub gps_id: u8,
15074    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15075    pub fix_type: u8,
15076    #[doc = "Number of satellites visible."]
15077    pub satellites_visible: u8,
15078    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15080    pub yaw: u16,
15081}
15082impl GPS_INPUT_DATA {
15083    pub const ENCODED_LEN: usize = 65usize;
15084    pub const DEFAULT: Self = Self {
15085        time_usec: 0_u64,
15086        time_week_ms: 0_u32,
15087        lat: 0_i32,
15088        lon: 0_i32,
15089        alt: 0.0_f32,
15090        hdop: 0.0_f32,
15091        vdop: 0.0_f32,
15092        vn: 0.0_f32,
15093        ve: 0.0_f32,
15094        vd: 0.0_f32,
15095        speed_accuracy: 0.0_f32,
15096        horiz_accuracy: 0.0_f32,
15097        vert_accuracy: 0.0_f32,
15098        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15099        time_week: 0_u16,
15100        gps_id: 0_u8,
15101        fix_type: 0_u8,
15102        satellites_visible: 0_u8,
15103        yaw: 0_u16,
15104    };
15105    #[cfg(feature = "arbitrary")]
15106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15107        use arbitrary::{Arbitrary, Unstructured};
15108        let mut buf = [0u8; 1024];
15109        rng.fill_bytes(&mut buf);
15110        let mut unstructured = Unstructured::new(&buf);
15111        Self::arbitrary(&mut unstructured).unwrap_or_default()
15112    }
15113}
15114impl Default for GPS_INPUT_DATA {
15115    fn default() -> Self {
15116        Self::DEFAULT.clone()
15117    }
15118}
15119impl MessageData for GPS_INPUT_DATA {
15120    type Message = MavMessage;
15121    const ID: u32 = 232u32;
15122    const NAME: &'static str = "GPS_INPUT";
15123    const EXTRA_CRC: u8 = 151u8;
15124    const ENCODED_LEN: usize = 65usize;
15125    fn deser(
15126        _version: MavlinkVersion,
15127        __input: &[u8],
15128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15129        let avail_len = __input.len();
15130        let mut payload_buf = [0; Self::ENCODED_LEN];
15131        let mut buf = if avail_len < Self::ENCODED_LEN {
15132            payload_buf[0..avail_len].copy_from_slice(__input);
15133            Bytes::new(&payload_buf)
15134        } else {
15135            Bytes::new(__input)
15136        };
15137        let mut __struct = Self::default();
15138        __struct.time_usec = buf.get_u64_le();
15139        __struct.time_week_ms = buf.get_u32_le();
15140        __struct.lat = buf.get_i32_le();
15141        __struct.lon = buf.get_i32_le();
15142        __struct.alt = buf.get_f32_le();
15143        __struct.hdop = buf.get_f32_le();
15144        __struct.vdop = buf.get_f32_le();
15145        __struct.vn = buf.get_f32_le();
15146        __struct.ve = buf.get_f32_le();
15147        __struct.vd = buf.get_f32_le();
15148        __struct.speed_accuracy = buf.get_f32_le();
15149        __struct.horiz_accuracy = buf.get_f32_le();
15150        __struct.vert_accuracy = buf.get_f32_le();
15151        let tmp = buf.get_u16_le();
15152        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
15153            tmp & GpsInputIgnoreFlags::all().bits(),
15154        )
15155        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15156            flag_type: "GpsInputIgnoreFlags",
15157            value: tmp as u32,
15158        })?;
15159        __struct.time_week = buf.get_u16_le();
15160        __struct.gps_id = buf.get_u8();
15161        __struct.fix_type = buf.get_u8();
15162        __struct.satellites_visible = buf.get_u8();
15163        __struct.yaw = buf.get_u16_le();
15164        Ok(__struct)
15165    }
15166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15167        let mut __tmp = BytesMut::new(bytes);
15168        #[allow(clippy::absurd_extreme_comparisons)]
15169        #[allow(unused_comparisons)]
15170        if __tmp.remaining() < Self::ENCODED_LEN {
15171            panic!(
15172                "buffer is too small (need {} bytes, but got {})",
15173                Self::ENCODED_LEN,
15174                __tmp.remaining(),
15175            )
15176        }
15177        __tmp.put_u64_le(self.time_usec);
15178        __tmp.put_u32_le(self.time_week_ms);
15179        __tmp.put_i32_le(self.lat);
15180        __tmp.put_i32_le(self.lon);
15181        __tmp.put_f32_le(self.alt);
15182        __tmp.put_f32_le(self.hdop);
15183        __tmp.put_f32_le(self.vdop);
15184        __tmp.put_f32_le(self.vn);
15185        __tmp.put_f32_le(self.ve);
15186        __tmp.put_f32_le(self.vd);
15187        __tmp.put_f32_le(self.speed_accuracy);
15188        __tmp.put_f32_le(self.horiz_accuracy);
15189        __tmp.put_f32_le(self.vert_accuracy);
15190        __tmp.put_u16_le(self.ignore_flags.bits());
15191        __tmp.put_u16_le(self.time_week);
15192        __tmp.put_u8(self.gps_id);
15193        __tmp.put_u8(self.fix_type);
15194        __tmp.put_u8(self.satellites_visible);
15195        if matches!(version, MavlinkVersion::V2) {
15196            __tmp.put_u16_le(self.yaw);
15197            let len = __tmp.len();
15198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15199        } else {
15200            __tmp.len()
15201        }
15202    }
15203}
15204#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15205#[doc = ""]
15206#[doc = "ID: 24"]
15207#[derive(Debug, Clone, PartialEq)]
15208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15210#[cfg_attr(feature = "ts", derive(TS))]
15211#[cfg_attr(feature = "ts", ts(export))]
15212pub struct GPS_RAW_INT_DATA {
15213    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15214    pub time_usec: u64,
15215    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15216    pub lat: i32,
15217    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15218    pub lon: i32,
15219    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15220    pub alt: i32,
15221    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15222    pub eph: u16,
15223    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15224    pub epv: u16,
15225    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15226    pub vel: u16,
15227    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15228    pub cog: u16,
15229    #[doc = "GPS fix type."]
15230    pub fix_type: GpsFixType,
15231    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15232    pub satellites_visible: u8,
15233    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15235    pub alt_ellipsoid: i32,
15236    #[doc = "Position uncertainty."]
15237    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15238    pub h_acc: u32,
15239    #[doc = "Altitude uncertainty."]
15240    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15241    pub v_acc: u32,
15242    #[doc = "Speed uncertainty."]
15243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15244    pub vel_acc: u32,
15245    #[doc = "Heading / track uncertainty"]
15246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15247    pub hdg_acc: u32,
15248    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15250    pub yaw: u16,
15251}
15252impl GPS_RAW_INT_DATA {
15253    pub const ENCODED_LEN: usize = 52usize;
15254    pub const DEFAULT: Self = Self {
15255        time_usec: 0_u64,
15256        lat: 0_i32,
15257        lon: 0_i32,
15258        alt: 0_i32,
15259        eph: 0_u16,
15260        epv: 0_u16,
15261        vel: 0_u16,
15262        cog: 0_u16,
15263        fix_type: GpsFixType::DEFAULT,
15264        satellites_visible: 0_u8,
15265        alt_ellipsoid: 0_i32,
15266        h_acc: 0_u32,
15267        v_acc: 0_u32,
15268        vel_acc: 0_u32,
15269        hdg_acc: 0_u32,
15270        yaw: 0_u16,
15271    };
15272    #[cfg(feature = "arbitrary")]
15273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15274        use arbitrary::{Arbitrary, Unstructured};
15275        let mut buf = [0u8; 1024];
15276        rng.fill_bytes(&mut buf);
15277        let mut unstructured = Unstructured::new(&buf);
15278        Self::arbitrary(&mut unstructured).unwrap_or_default()
15279    }
15280}
15281impl Default for GPS_RAW_INT_DATA {
15282    fn default() -> Self {
15283        Self::DEFAULT.clone()
15284    }
15285}
15286impl MessageData for GPS_RAW_INT_DATA {
15287    type Message = MavMessage;
15288    const ID: u32 = 24u32;
15289    const NAME: &'static str = "GPS_RAW_INT";
15290    const EXTRA_CRC: u8 = 24u8;
15291    const ENCODED_LEN: usize = 52usize;
15292    fn deser(
15293        _version: MavlinkVersion,
15294        __input: &[u8],
15295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15296        let avail_len = __input.len();
15297        let mut payload_buf = [0; Self::ENCODED_LEN];
15298        let mut buf = if avail_len < Self::ENCODED_LEN {
15299            payload_buf[0..avail_len].copy_from_slice(__input);
15300            Bytes::new(&payload_buf)
15301        } else {
15302            Bytes::new(__input)
15303        };
15304        let mut __struct = Self::default();
15305        __struct.time_usec = buf.get_u64_le();
15306        __struct.lat = buf.get_i32_le();
15307        __struct.lon = buf.get_i32_le();
15308        __struct.alt = buf.get_i32_le();
15309        __struct.eph = buf.get_u16_le();
15310        __struct.epv = buf.get_u16_le();
15311        __struct.vel = buf.get_u16_le();
15312        __struct.cog = buf.get_u16_le();
15313        let tmp = buf.get_u8();
15314        __struct.fix_type =
15315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15316                enum_type: "GpsFixType",
15317                value: tmp as u32,
15318            })?;
15319        __struct.satellites_visible = buf.get_u8();
15320        __struct.alt_ellipsoid = buf.get_i32_le();
15321        __struct.h_acc = buf.get_u32_le();
15322        __struct.v_acc = buf.get_u32_le();
15323        __struct.vel_acc = buf.get_u32_le();
15324        __struct.hdg_acc = buf.get_u32_le();
15325        __struct.yaw = buf.get_u16_le();
15326        Ok(__struct)
15327    }
15328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15329        let mut __tmp = BytesMut::new(bytes);
15330        #[allow(clippy::absurd_extreme_comparisons)]
15331        #[allow(unused_comparisons)]
15332        if __tmp.remaining() < Self::ENCODED_LEN {
15333            panic!(
15334                "buffer is too small (need {} bytes, but got {})",
15335                Self::ENCODED_LEN,
15336                __tmp.remaining(),
15337            )
15338        }
15339        __tmp.put_u64_le(self.time_usec);
15340        __tmp.put_i32_le(self.lat);
15341        __tmp.put_i32_le(self.lon);
15342        __tmp.put_i32_le(self.alt);
15343        __tmp.put_u16_le(self.eph);
15344        __tmp.put_u16_le(self.epv);
15345        __tmp.put_u16_le(self.vel);
15346        __tmp.put_u16_le(self.cog);
15347        __tmp.put_u8(self.fix_type as u8);
15348        __tmp.put_u8(self.satellites_visible);
15349        if matches!(version, MavlinkVersion::V2) {
15350            __tmp.put_i32_le(self.alt_ellipsoid);
15351            __tmp.put_u32_le(self.h_acc);
15352            __tmp.put_u32_le(self.v_acc);
15353            __tmp.put_u32_le(self.vel_acc);
15354            __tmp.put_u32_le(self.hdg_acc);
15355            __tmp.put_u16_le(self.yaw);
15356            let len = __tmp.len();
15357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15358        } else {
15359            __tmp.len()
15360        }
15361    }
15362}
15363#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15364#[doc = ""]
15365#[doc = "ID: 233"]
15366#[derive(Debug, Clone, PartialEq)]
15367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15369#[cfg_attr(feature = "ts", derive(TS))]
15370#[cfg_attr(feature = "ts", ts(export))]
15371pub struct GPS_RTCM_DATA_DATA {
15372    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15373    pub flags: u8,
15374    #[doc = "data length"]
15375    pub len: u8,
15376    #[doc = "RTCM message (may be fragmented)"]
15377    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15378    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15379    pub data: [u8; 180],
15380}
15381impl GPS_RTCM_DATA_DATA {
15382    pub const ENCODED_LEN: usize = 182usize;
15383    pub const DEFAULT: Self = Self {
15384        flags: 0_u8,
15385        len: 0_u8,
15386        data: [0_u8; 180usize],
15387    };
15388    #[cfg(feature = "arbitrary")]
15389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15390        use arbitrary::{Arbitrary, Unstructured};
15391        let mut buf = [0u8; 1024];
15392        rng.fill_bytes(&mut buf);
15393        let mut unstructured = Unstructured::new(&buf);
15394        Self::arbitrary(&mut unstructured).unwrap_or_default()
15395    }
15396}
15397impl Default for GPS_RTCM_DATA_DATA {
15398    fn default() -> Self {
15399        Self::DEFAULT.clone()
15400    }
15401}
15402impl MessageData for GPS_RTCM_DATA_DATA {
15403    type Message = MavMessage;
15404    const ID: u32 = 233u32;
15405    const NAME: &'static str = "GPS_RTCM_DATA";
15406    const EXTRA_CRC: u8 = 35u8;
15407    const ENCODED_LEN: usize = 182usize;
15408    fn deser(
15409        _version: MavlinkVersion,
15410        __input: &[u8],
15411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15412        let avail_len = __input.len();
15413        let mut payload_buf = [0; Self::ENCODED_LEN];
15414        let mut buf = if avail_len < Self::ENCODED_LEN {
15415            payload_buf[0..avail_len].copy_from_slice(__input);
15416            Bytes::new(&payload_buf)
15417        } else {
15418            Bytes::new(__input)
15419        };
15420        let mut __struct = Self::default();
15421        __struct.flags = buf.get_u8();
15422        __struct.len = buf.get_u8();
15423        for v in &mut __struct.data {
15424            let val = buf.get_u8();
15425            *v = val;
15426        }
15427        Ok(__struct)
15428    }
15429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15430        let mut __tmp = BytesMut::new(bytes);
15431        #[allow(clippy::absurd_extreme_comparisons)]
15432        #[allow(unused_comparisons)]
15433        if __tmp.remaining() < Self::ENCODED_LEN {
15434            panic!(
15435                "buffer is too small (need {} bytes, but got {})",
15436                Self::ENCODED_LEN,
15437                __tmp.remaining(),
15438            )
15439        }
15440        __tmp.put_u8(self.flags);
15441        __tmp.put_u8(self.len);
15442        for val in &self.data {
15443            __tmp.put_u8(*val);
15444        }
15445        if matches!(version, MavlinkVersion::V2) {
15446            let len = __tmp.len();
15447            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15448        } else {
15449            __tmp.len()
15450        }
15451    }
15452}
15453#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15454#[doc = ""]
15455#[doc = "ID: 127"]
15456#[derive(Debug, Clone, PartialEq)]
15457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15459#[cfg_attr(feature = "ts", derive(TS))]
15460#[cfg_attr(feature = "ts", ts(export))]
15461pub struct GPS_RTK_DATA {
15462    #[doc = "Time since boot of last baseline message received."]
15463    pub time_last_baseline_ms: u32,
15464    #[doc = "GPS Time of Week of last baseline"]
15465    pub tow: u32,
15466    #[doc = "Current baseline in ECEF x or NED north component."]
15467    pub baseline_a_mm: i32,
15468    #[doc = "Current baseline in ECEF y or NED east component."]
15469    pub baseline_b_mm: i32,
15470    #[doc = "Current baseline in ECEF z or NED down component."]
15471    pub baseline_c_mm: i32,
15472    #[doc = "Current estimate of baseline accuracy."]
15473    pub accuracy: u32,
15474    #[doc = "Current number of integer ambiguity hypotheses."]
15475    pub iar_num_hypotheses: i32,
15476    #[doc = "GPS Week Number of last baseline"]
15477    pub wn: u16,
15478    #[doc = "Identification of connected RTK receiver."]
15479    pub rtk_receiver_id: u8,
15480    #[doc = "GPS-specific health report for RTK data."]
15481    pub rtk_health: u8,
15482    #[doc = "Rate of baseline messages being received by GPS"]
15483    pub rtk_rate: u8,
15484    #[doc = "Current number of sats used for RTK calculation."]
15485    pub nsats: u8,
15486    #[doc = "Coordinate system of baseline"]
15487    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15488}
15489impl GPS_RTK_DATA {
15490    pub const ENCODED_LEN: usize = 35usize;
15491    pub const DEFAULT: Self = Self {
15492        time_last_baseline_ms: 0_u32,
15493        tow: 0_u32,
15494        baseline_a_mm: 0_i32,
15495        baseline_b_mm: 0_i32,
15496        baseline_c_mm: 0_i32,
15497        accuracy: 0_u32,
15498        iar_num_hypotheses: 0_i32,
15499        wn: 0_u16,
15500        rtk_receiver_id: 0_u8,
15501        rtk_health: 0_u8,
15502        rtk_rate: 0_u8,
15503        nsats: 0_u8,
15504        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15505    };
15506    #[cfg(feature = "arbitrary")]
15507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15508        use arbitrary::{Arbitrary, Unstructured};
15509        let mut buf = [0u8; 1024];
15510        rng.fill_bytes(&mut buf);
15511        let mut unstructured = Unstructured::new(&buf);
15512        Self::arbitrary(&mut unstructured).unwrap_or_default()
15513    }
15514}
15515impl Default for GPS_RTK_DATA {
15516    fn default() -> Self {
15517        Self::DEFAULT.clone()
15518    }
15519}
15520impl MessageData for GPS_RTK_DATA {
15521    type Message = MavMessage;
15522    const ID: u32 = 127u32;
15523    const NAME: &'static str = "GPS_RTK";
15524    const EXTRA_CRC: u8 = 25u8;
15525    const ENCODED_LEN: usize = 35usize;
15526    fn deser(
15527        _version: MavlinkVersion,
15528        __input: &[u8],
15529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15530        let avail_len = __input.len();
15531        let mut payload_buf = [0; Self::ENCODED_LEN];
15532        let mut buf = if avail_len < Self::ENCODED_LEN {
15533            payload_buf[0..avail_len].copy_from_slice(__input);
15534            Bytes::new(&payload_buf)
15535        } else {
15536            Bytes::new(__input)
15537        };
15538        let mut __struct = Self::default();
15539        __struct.time_last_baseline_ms = buf.get_u32_le();
15540        __struct.tow = buf.get_u32_le();
15541        __struct.baseline_a_mm = buf.get_i32_le();
15542        __struct.baseline_b_mm = buf.get_i32_le();
15543        __struct.baseline_c_mm = buf.get_i32_le();
15544        __struct.accuracy = buf.get_u32_le();
15545        __struct.iar_num_hypotheses = buf.get_i32_le();
15546        __struct.wn = buf.get_u16_le();
15547        __struct.rtk_receiver_id = buf.get_u8();
15548        __struct.rtk_health = buf.get_u8();
15549        __struct.rtk_rate = buf.get_u8();
15550        __struct.nsats = buf.get_u8();
15551        let tmp = buf.get_u8();
15552        __struct.baseline_coords_type =
15553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15554                enum_type: "RtkBaselineCoordinateSystem",
15555                value: tmp as u32,
15556            })?;
15557        Ok(__struct)
15558    }
15559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15560        let mut __tmp = BytesMut::new(bytes);
15561        #[allow(clippy::absurd_extreme_comparisons)]
15562        #[allow(unused_comparisons)]
15563        if __tmp.remaining() < Self::ENCODED_LEN {
15564            panic!(
15565                "buffer is too small (need {} bytes, but got {})",
15566                Self::ENCODED_LEN,
15567                __tmp.remaining(),
15568            )
15569        }
15570        __tmp.put_u32_le(self.time_last_baseline_ms);
15571        __tmp.put_u32_le(self.tow);
15572        __tmp.put_i32_le(self.baseline_a_mm);
15573        __tmp.put_i32_le(self.baseline_b_mm);
15574        __tmp.put_i32_le(self.baseline_c_mm);
15575        __tmp.put_u32_le(self.accuracy);
15576        __tmp.put_i32_le(self.iar_num_hypotheses);
15577        __tmp.put_u16_le(self.wn);
15578        __tmp.put_u8(self.rtk_receiver_id);
15579        __tmp.put_u8(self.rtk_health);
15580        __tmp.put_u8(self.rtk_rate);
15581        __tmp.put_u8(self.nsats);
15582        __tmp.put_u8(self.baseline_coords_type as u8);
15583        if matches!(version, MavlinkVersion::V2) {
15584            let len = __tmp.len();
15585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15586        } else {
15587            __tmp.len()
15588        }
15589    }
15590}
15591#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15592#[doc = ""]
15593#[doc = "ID: 25"]
15594#[derive(Debug, Clone, PartialEq)]
15595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15597#[cfg_attr(feature = "ts", derive(TS))]
15598#[cfg_attr(feature = "ts", ts(export))]
15599pub struct GPS_STATUS_DATA {
15600    #[doc = "Number of satellites visible"]
15601    pub satellites_visible: u8,
15602    #[doc = "Global satellite ID"]
15603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15605    pub satellite_prn: [u8; 20],
15606    #[doc = "0: Satellite not used, 1: used for localization"]
15607    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15608    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15609    pub satellite_used: [u8; 20],
15610    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15613    pub satellite_elevation: [u8; 20],
15614    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15617    pub satellite_azimuth: [u8; 20],
15618    #[doc = "Signal to noise ratio of satellite"]
15619    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15620    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15621    pub satellite_snr: [u8; 20],
15622}
15623impl GPS_STATUS_DATA {
15624    pub const ENCODED_LEN: usize = 101usize;
15625    pub const DEFAULT: Self = Self {
15626        satellites_visible: 0_u8,
15627        satellite_prn: [0_u8; 20usize],
15628        satellite_used: [0_u8; 20usize],
15629        satellite_elevation: [0_u8; 20usize],
15630        satellite_azimuth: [0_u8; 20usize],
15631        satellite_snr: [0_u8; 20usize],
15632    };
15633    #[cfg(feature = "arbitrary")]
15634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15635        use arbitrary::{Arbitrary, Unstructured};
15636        let mut buf = [0u8; 1024];
15637        rng.fill_bytes(&mut buf);
15638        let mut unstructured = Unstructured::new(&buf);
15639        Self::arbitrary(&mut unstructured).unwrap_or_default()
15640    }
15641}
15642impl Default for GPS_STATUS_DATA {
15643    fn default() -> Self {
15644        Self::DEFAULT.clone()
15645    }
15646}
15647impl MessageData for GPS_STATUS_DATA {
15648    type Message = MavMessage;
15649    const ID: u32 = 25u32;
15650    const NAME: &'static str = "GPS_STATUS";
15651    const EXTRA_CRC: u8 = 23u8;
15652    const ENCODED_LEN: usize = 101usize;
15653    fn deser(
15654        _version: MavlinkVersion,
15655        __input: &[u8],
15656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15657        let avail_len = __input.len();
15658        let mut payload_buf = [0; Self::ENCODED_LEN];
15659        let mut buf = if avail_len < Self::ENCODED_LEN {
15660            payload_buf[0..avail_len].copy_from_slice(__input);
15661            Bytes::new(&payload_buf)
15662        } else {
15663            Bytes::new(__input)
15664        };
15665        let mut __struct = Self::default();
15666        __struct.satellites_visible = buf.get_u8();
15667        for v in &mut __struct.satellite_prn {
15668            let val = buf.get_u8();
15669            *v = val;
15670        }
15671        for v in &mut __struct.satellite_used {
15672            let val = buf.get_u8();
15673            *v = val;
15674        }
15675        for v in &mut __struct.satellite_elevation {
15676            let val = buf.get_u8();
15677            *v = val;
15678        }
15679        for v in &mut __struct.satellite_azimuth {
15680            let val = buf.get_u8();
15681            *v = val;
15682        }
15683        for v in &mut __struct.satellite_snr {
15684            let val = buf.get_u8();
15685            *v = val;
15686        }
15687        Ok(__struct)
15688    }
15689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15690        let mut __tmp = BytesMut::new(bytes);
15691        #[allow(clippy::absurd_extreme_comparisons)]
15692        #[allow(unused_comparisons)]
15693        if __tmp.remaining() < Self::ENCODED_LEN {
15694            panic!(
15695                "buffer is too small (need {} bytes, but got {})",
15696                Self::ENCODED_LEN,
15697                __tmp.remaining(),
15698            )
15699        }
15700        __tmp.put_u8(self.satellites_visible);
15701        for val in &self.satellite_prn {
15702            __tmp.put_u8(*val);
15703        }
15704        for val in &self.satellite_used {
15705            __tmp.put_u8(*val);
15706        }
15707        for val in &self.satellite_elevation {
15708            __tmp.put_u8(*val);
15709        }
15710        for val in &self.satellite_azimuth {
15711            __tmp.put_u8(*val);
15712        }
15713        for val in &self.satellite_snr {
15714            __tmp.put_u8(*val);
15715        }
15716        if matches!(version, MavlinkVersion::V2) {
15717            let len = __tmp.len();
15718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15719        } else {
15720            __tmp.len()
15721        }
15722    }
15723}
15724#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
15725#[doc = ""]
15726#[doc = "ID: 415"]
15727#[derive(Debug, Clone, PartialEq)]
15728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15730#[cfg_attr(feature = "ts", derive(TS))]
15731#[cfg_attr(feature = "ts", ts(export))]
15732pub struct GROUP_END_DATA {
15733    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15734    pub time_usec: u64,
15735    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_END)."]
15736    pub group_id: u32,
15737    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15738    pub mission_checksum: u32,
15739}
15740impl GROUP_END_DATA {
15741    pub const ENCODED_LEN: usize = 16usize;
15742    pub const DEFAULT: Self = Self {
15743        time_usec: 0_u64,
15744        group_id: 0_u32,
15745        mission_checksum: 0_u32,
15746    };
15747    #[cfg(feature = "arbitrary")]
15748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15749        use arbitrary::{Arbitrary, Unstructured};
15750        let mut buf = [0u8; 1024];
15751        rng.fill_bytes(&mut buf);
15752        let mut unstructured = Unstructured::new(&buf);
15753        Self::arbitrary(&mut unstructured).unwrap_or_default()
15754    }
15755}
15756impl Default for GROUP_END_DATA {
15757    fn default() -> Self {
15758        Self::DEFAULT.clone()
15759    }
15760}
15761impl MessageData for GROUP_END_DATA {
15762    type Message = MavMessage;
15763    const ID: u32 = 415u32;
15764    const NAME: &'static str = "GROUP_END";
15765    const EXTRA_CRC: u8 = 161u8;
15766    const ENCODED_LEN: usize = 16usize;
15767    fn deser(
15768        _version: MavlinkVersion,
15769        __input: &[u8],
15770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15771        let avail_len = __input.len();
15772        let mut payload_buf = [0; Self::ENCODED_LEN];
15773        let mut buf = if avail_len < Self::ENCODED_LEN {
15774            payload_buf[0..avail_len].copy_from_slice(__input);
15775            Bytes::new(&payload_buf)
15776        } else {
15777            Bytes::new(__input)
15778        };
15779        let mut __struct = Self::default();
15780        __struct.time_usec = buf.get_u64_le();
15781        __struct.group_id = buf.get_u32_le();
15782        __struct.mission_checksum = buf.get_u32_le();
15783        Ok(__struct)
15784    }
15785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15786        let mut __tmp = BytesMut::new(bytes);
15787        #[allow(clippy::absurd_extreme_comparisons)]
15788        #[allow(unused_comparisons)]
15789        if __tmp.remaining() < Self::ENCODED_LEN {
15790            panic!(
15791                "buffer is too small (need {} bytes, but got {})",
15792                Self::ENCODED_LEN,
15793                __tmp.remaining(),
15794            )
15795        }
15796        __tmp.put_u64_le(self.time_usec);
15797        __tmp.put_u32_le(self.group_id);
15798        __tmp.put_u32_le(self.mission_checksum);
15799        if matches!(version, MavlinkVersion::V2) {
15800            let len = __tmp.len();
15801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15802        } else {
15803            __tmp.len()
15804        }
15805    }
15806}
15807#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
15808#[doc = ""]
15809#[doc = "ID: 414"]
15810#[derive(Debug, Clone, PartialEq)]
15811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15813#[cfg_attr(feature = "ts", derive(TS))]
15814#[cfg_attr(feature = "ts", ts(export))]
15815pub struct GROUP_START_DATA {
15816    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15817    pub time_usec: u64,
15818    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_START)."]
15819    pub group_id: u32,
15820    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15821    pub mission_checksum: u32,
15822}
15823impl GROUP_START_DATA {
15824    pub const ENCODED_LEN: usize = 16usize;
15825    pub const DEFAULT: Self = Self {
15826        time_usec: 0_u64,
15827        group_id: 0_u32,
15828        mission_checksum: 0_u32,
15829    };
15830    #[cfg(feature = "arbitrary")]
15831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15832        use arbitrary::{Arbitrary, Unstructured};
15833        let mut buf = [0u8; 1024];
15834        rng.fill_bytes(&mut buf);
15835        let mut unstructured = Unstructured::new(&buf);
15836        Self::arbitrary(&mut unstructured).unwrap_or_default()
15837    }
15838}
15839impl Default for GROUP_START_DATA {
15840    fn default() -> Self {
15841        Self::DEFAULT.clone()
15842    }
15843}
15844impl MessageData for GROUP_START_DATA {
15845    type Message = MavMessage;
15846    const ID: u32 = 414u32;
15847    const NAME: &'static str = "GROUP_START";
15848    const EXTRA_CRC: u8 = 109u8;
15849    const ENCODED_LEN: usize = 16usize;
15850    fn deser(
15851        _version: MavlinkVersion,
15852        __input: &[u8],
15853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15854        let avail_len = __input.len();
15855        let mut payload_buf = [0; Self::ENCODED_LEN];
15856        let mut buf = if avail_len < Self::ENCODED_LEN {
15857            payload_buf[0..avail_len].copy_from_slice(__input);
15858            Bytes::new(&payload_buf)
15859        } else {
15860            Bytes::new(__input)
15861        };
15862        let mut __struct = Self::default();
15863        __struct.time_usec = buf.get_u64_le();
15864        __struct.group_id = buf.get_u32_le();
15865        __struct.mission_checksum = buf.get_u32_le();
15866        Ok(__struct)
15867    }
15868    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15869        let mut __tmp = BytesMut::new(bytes);
15870        #[allow(clippy::absurd_extreme_comparisons)]
15871        #[allow(unused_comparisons)]
15872        if __tmp.remaining() < Self::ENCODED_LEN {
15873            panic!(
15874                "buffer is too small (need {} bytes, but got {})",
15875                Self::ENCODED_LEN,
15876                __tmp.remaining(),
15877            )
15878        }
15879        __tmp.put_u64_le(self.time_usec);
15880        __tmp.put_u32_le(self.group_id);
15881        __tmp.put_u32_le(self.mission_checksum);
15882        if matches!(version, MavlinkVersion::V2) {
15883            let len = __tmp.len();
15884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15885        } else {
15886            __tmp.len()
15887        }
15888    }
15889}
15890#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15891#[doc = ""]
15892#[doc = "ID: 0"]
15893#[derive(Debug, Clone, PartialEq)]
15894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15896#[cfg_attr(feature = "ts", derive(TS))]
15897#[cfg_attr(feature = "ts", ts(export))]
15898pub struct HEARTBEAT_DATA {
15899    #[doc = "A bitfield for use for autopilot-specific flags"]
15900    pub custom_mode: u32,
15901    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15902    pub mavtype: MavType,
15903    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15904    pub autopilot: MavAutopilot,
15905    #[doc = "System mode bitmap."]
15906    pub base_mode: MavModeFlag,
15907    #[doc = "System status flag."]
15908    pub system_status: MavState,
15909    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15910    pub mavlink_version: u8,
15911}
15912impl HEARTBEAT_DATA {
15913    pub const ENCODED_LEN: usize = 9usize;
15914    pub const DEFAULT: Self = Self {
15915        custom_mode: 0_u32,
15916        mavtype: MavType::DEFAULT,
15917        autopilot: MavAutopilot::DEFAULT,
15918        base_mode: MavModeFlag::DEFAULT,
15919        system_status: MavState::DEFAULT,
15920        mavlink_version: MINOR_MAVLINK_VERSION,
15921    };
15922    #[cfg(feature = "arbitrary")]
15923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15924        use arbitrary::{Arbitrary, Unstructured};
15925        let mut buf = [0u8; 1024];
15926        rng.fill_bytes(&mut buf);
15927        let mut unstructured = Unstructured::new(&buf);
15928        Self::arbitrary(&mut unstructured).unwrap_or_default()
15929    }
15930}
15931impl Default for HEARTBEAT_DATA {
15932    fn default() -> Self {
15933        Self::DEFAULT.clone()
15934    }
15935}
15936impl MessageData for HEARTBEAT_DATA {
15937    type Message = MavMessage;
15938    const ID: u32 = 0u32;
15939    const NAME: &'static str = "HEARTBEAT";
15940    const EXTRA_CRC: u8 = 50u8;
15941    const ENCODED_LEN: usize = 9usize;
15942    fn deser(
15943        _version: MavlinkVersion,
15944        __input: &[u8],
15945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15946        let avail_len = __input.len();
15947        let mut payload_buf = [0; Self::ENCODED_LEN];
15948        let mut buf = if avail_len < Self::ENCODED_LEN {
15949            payload_buf[0..avail_len].copy_from_slice(__input);
15950            Bytes::new(&payload_buf)
15951        } else {
15952            Bytes::new(__input)
15953        };
15954        let mut __struct = Self::default();
15955        __struct.custom_mode = buf.get_u32_le();
15956        let tmp = buf.get_u8();
15957        __struct.mavtype =
15958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15959                enum_type: "MavType",
15960                value: tmp as u32,
15961            })?;
15962        let tmp = buf.get_u8();
15963        __struct.autopilot =
15964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15965                enum_type: "MavAutopilot",
15966                value: tmp as u32,
15967            })?;
15968        let tmp = buf.get_u8();
15969        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15970            ::mavlink_core::error::ParserError::InvalidFlag {
15971                flag_type: "MavModeFlag",
15972                value: tmp as u32,
15973            },
15974        )?;
15975        let tmp = buf.get_u8();
15976        __struct.system_status =
15977            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15978                enum_type: "MavState",
15979                value: tmp as u32,
15980            })?;
15981        __struct.mavlink_version = buf.get_u8();
15982        Ok(__struct)
15983    }
15984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15985        let mut __tmp = BytesMut::new(bytes);
15986        #[allow(clippy::absurd_extreme_comparisons)]
15987        #[allow(unused_comparisons)]
15988        if __tmp.remaining() < Self::ENCODED_LEN {
15989            panic!(
15990                "buffer is too small (need {} bytes, but got {})",
15991                Self::ENCODED_LEN,
15992                __tmp.remaining(),
15993            )
15994        }
15995        __tmp.put_u32_le(self.custom_mode);
15996        __tmp.put_u8(self.mavtype as u8);
15997        __tmp.put_u8(self.autopilot as u8);
15998        __tmp.put_u8(self.base_mode.bits());
15999        __tmp.put_u8(self.system_status as u8);
16000        __tmp.put_u8(self.mavlink_version);
16001        if matches!(version, MavlinkVersion::V2) {
16002            let len = __tmp.len();
16003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16004        } else {
16005            __tmp.len()
16006        }
16007    }
16008}
16009#[doc = "The IMU readings in SI units in NED body frame."]
16010#[doc = ""]
16011#[doc = "ID: 105"]
16012#[derive(Debug, Clone, PartialEq)]
16013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16015#[cfg_attr(feature = "ts", derive(TS))]
16016#[cfg_attr(feature = "ts", ts(export))]
16017pub struct HIGHRES_IMU_DATA {
16018    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16019    pub time_usec: u64,
16020    #[doc = "X acceleration"]
16021    pub xacc: f32,
16022    #[doc = "Y acceleration"]
16023    pub yacc: f32,
16024    #[doc = "Z acceleration"]
16025    pub zacc: f32,
16026    #[doc = "Angular speed around X axis"]
16027    pub xgyro: f32,
16028    #[doc = "Angular speed around Y axis"]
16029    pub ygyro: f32,
16030    #[doc = "Angular speed around Z axis"]
16031    pub zgyro: f32,
16032    #[doc = "X Magnetic field"]
16033    pub xmag: f32,
16034    #[doc = "Y Magnetic field"]
16035    pub ymag: f32,
16036    #[doc = "Z Magnetic field"]
16037    pub zmag: f32,
16038    #[doc = "Absolute pressure"]
16039    pub abs_pressure: f32,
16040    #[doc = "Differential pressure"]
16041    pub diff_pressure: f32,
16042    #[doc = "Altitude calculated from pressure"]
16043    pub pressure_alt: f32,
16044    #[doc = "Temperature"]
16045    pub temperature: f32,
16046    #[doc = "Bitmap for fields that have updated since last message"]
16047    pub fields_updated: HighresImuUpdatedFlags,
16048    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
16049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16050    pub id: u8,
16051}
16052impl HIGHRES_IMU_DATA {
16053    pub const ENCODED_LEN: usize = 63usize;
16054    pub const DEFAULT: Self = Self {
16055        time_usec: 0_u64,
16056        xacc: 0.0_f32,
16057        yacc: 0.0_f32,
16058        zacc: 0.0_f32,
16059        xgyro: 0.0_f32,
16060        ygyro: 0.0_f32,
16061        zgyro: 0.0_f32,
16062        xmag: 0.0_f32,
16063        ymag: 0.0_f32,
16064        zmag: 0.0_f32,
16065        abs_pressure: 0.0_f32,
16066        diff_pressure: 0.0_f32,
16067        pressure_alt: 0.0_f32,
16068        temperature: 0.0_f32,
16069        fields_updated: HighresImuUpdatedFlags::DEFAULT,
16070        id: 0_u8,
16071    };
16072    #[cfg(feature = "arbitrary")]
16073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16074        use arbitrary::{Arbitrary, Unstructured};
16075        let mut buf = [0u8; 1024];
16076        rng.fill_bytes(&mut buf);
16077        let mut unstructured = Unstructured::new(&buf);
16078        Self::arbitrary(&mut unstructured).unwrap_or_default()
16079    }
16080}
16081impl Default for HIGHRES_IMU_DATA {
16082    fn default() -> Self {
16083        Self::DEFAULT.clone()
16084    }
16085}
16086impl MessageData for HIGHRES_IMU_DATA {
16087    type Message = MavMessage;
16088    const ID: u32 = 105u32;
16089    const NAME: &'static str = "HIGHRES_IMU";
16090    const EXTRA_CRC: u8 = 93u8;
16091    const ENCODED_LEN: usize = 63usize;
16092    fn deser(
16093        _version: MavlinkVersion,
16094        __input: &[u8],
16095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16096        let avail_len = __input.len();
16097        let mut payload_buf = [0; Self::ENCODED_LEN];
16098        let mut buf = if avail_len < Self::ENCODED_LEN {
16099            payload_buf[0..avail_len].copy_from_slice(__input);
16100            Bytes::new(&payload_buf)
16101        } else {
16102            Bytes::new(__input)
16103        };
16104        let mut __struct = Self::default();
16105        __struct.time_usec = buf.get_u64_le();
16106        __struct.xacc = buf.get_f32_le();
16107        __struct.yacc = buf.get_f32_le();
16108        __struct.zacc = buf.get_f32_le();
16109        __struct.xgyro = buf.get_f32_le();
16110        __struct.ygyro = buf.get_f32_le();
16111        __struct.zgyro = buf.get_f32_le();
16112        __struct.xmag = buf.get_f32_le();
16113        __struct.ymag = buf.get_f32_le();
16114        __struct.zmag = buf.get_f32_le();
16115        __struct.abs_pressure = buf.get_f32_le();
16116        __struct.diff_pressure = buf.get_f32_le();
16117        __struct.pressure_alt = buf.get_f32_le();
16118        __struct.temperature = buf.get_f32_le();
16119        let tmp = buf.get_u16_le();
16120        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
16121            tmp & HighresImuUpdatedFlags::all().bits(),
16122        )
16123        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16124            flag_type: "HighresImuUpdatedFlags",
16125            value: tmp as u32,
16126        })?;
16127        __struct.id = buf.get_u8();
16128        Ok(__struct)
16129    }
16130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16131        let mut __tmp = BytesMut::new(bytes);
16132        #[allow(clippy::absurd_extreme_comparisons)]
16133        #[allow(unused_comparisons)]
16134        if __tmp.remaining() < Self::ENCODED_LEN {
16135            panic!(
16136                "buffer is too small (need {} bytes, but got {})",
16137                Self::ENCODED_LEN,
16138                __tmp.remaining(),
16139            )
16140        }
16141        __tmp.put_u64_le(self.time_usec);
16142        __tmp.put_f32_le(self.xacc);
16143        __tmp.put_f32_le(self.yacc);
16144        __tmp.put_f32_le(self.zacc);
16145        __tmp.put_f32_le(self.xgyro);
16146        __tmp.put_f32_le(self.ygyro);
16147        __tmp.put_f32_le(self.zgyro);
16148        __tmp.put_f32_le(self.xmag);
16149        __tmp.put_f32_le(self.ymag);
16150        __tmp.put_f32_le(self.zmag);
16151        __tmp.put_f32_le(self.abs_pressure);
16152        __tmp.put_f32_le(self.diff_pressure);
16153        __tmp.put_f32_le(self.pressure_alt);
16154        __tmp.put_f32_le(self.temperature);
16155        __tmp.put_u16_le(self.fields_updated.bits());
16156        if matches!(version, MavlinkVersion::V2) {
16157            __tmp.put_u8(self.id);
16158            let len = __tmp.len();
16159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16160        } else {
16161            __tmp.len()
16162        }
16163    }
16164}
16165#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16166#[doc = "Message appropriate for high latency connections like Iridium."]
16167#[doc = ""]
16168#[doc = "ID: 234"]
16169#[derive(Debug, Clone, PartialEq)]
16170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16172#[cfg_attr(feature = "ts", derive(TS))]
16173#[cfg_attr(feature = "ts", ts(export))]
16174pub struct HIGH_LATENCY_DATA {
16175    #[doc = "A bitfield for use for autopilot-specific flags."]
16176    pub custom_mode: u32,
16177    #[doc = "Latitude"]
16178    pub latitude: i32,
16179    #[doc = "Longitude"]
16180    pub longitude: i32,
16181    #[doc = "roll"]
16182    pub roll: i16,
16183    #[doc = "pitch"]
16184    pub pitch: i16,
16185    #[doc = "heading"]
16186    pub heading: u16,
16187    #[doc = "heading setpoint"]
16188    pub heading_sp: i16,
16189    #[doc = "Altitude above mean sea level"]
16190    pub altitude_amsl: i16,
16191    #[doc = "Altitude setpoint relative to the home position"]
16192    pub altitude_sp: i16,
16193    #[doc = "distance to target"]
16194    pub wp_distance: u16,
16195    #[doc = "Bitmap of enabled system modes."]
16196    pub base_mode: MavModeFlag,
16197    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16198    pub landed_state: MavLandedState,
16199    #[doc = "throttle (percentage)"]
16200    pub throttle: i8,
16201    #[doc = "airspeed"]
16202    pub airspeed: u8,
16203    #[doc = "airspeed setpoint"]
16204    pub airspeed_sp: u8,
16205    #[doc = "groundspeed"]
16206    pub groundspeed: u8,
16207    #[doc = "climb rate"]
16208    pub climb_rate: i8,
16209    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16210    pub gps_nsat: u8,
16211    #[doc = "GPS Fix type."]
16212    pub gps_fix_type: GpsFixType,
16213    #[doc = "Remaining battery (percentage)"]
16214    pub battery_remaining: u8,
16215    #[doc = "Autopilot temperature (degrees C)"]
16216    pub temperature: i8,
16217    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16218    pub temperature_air: i8,
16219    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16220    pub failsafe: u8,
16221    #[doc = "current waypoint number"]
16222    pub wp_num: u8,
16223}
16224impl HIGH_LATENCY_DATA {
16225    pub const ENCODED_LEN: usize = 40usize;
16226    pub const DEFAULT: Self = Self {
16227        custom_mode: 0_u32,
16228        latitude: 0_i32,
16229        longitude: 0_i32,
16230        roll: 0_i16,
16231        pitch: 0_i16,
16232        heading: 0_u16,
16233        heading_sp: 0_i16,
16234        altitude_amsl: 0_i16,
16235        altitude_sp: 0_i16,
16236        wp_distance: 0_u16,
16237        base_mode: MavModeFlag::DEFAULT,
16238        landed_state: MavLandedState::DEFAULT,
16239        throttle: 0_i8,
16240        airspeed: 0_u8,
16241        airspeed_sp: 0_u8,
16242        groundspeed: 0_u8,
16243        climb_rate: 0_i8,
16244        gps_nsat: 0_u8,
16245        gps_fix_type: GpsFixType::DEFAULT,
16246        battery_remaining: 0_u8,
16247        temperature: 0_i8,
16248        temperature_air: 0_i8,
16249        failsafe: 0_u8,
16250        wp_num: 0_u8,
16251    };
16252    #[cfg(feature = "arbitrary")]
16253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16254        use arbitrary::{Arbitrary, Unstructured};
16255        let mut buf = [0u8; 1024];
16256        rng.fill_bytes(&mut buf);
16257        let mut unstructured = Unstructured::new(&buf);
16258        Self::arbitrary(&mut unstructured).unwrap_or_default()
16259    }
16260}
16261impl Default for HIGH_LATENCY_DATA {
16262    fn default() -> Self {
16263        Self::DEFAULT.clone()
16264    }
16265}
16266impl MessageData for HIGH_LATENCY_DATA {
16267    type Message = MavMessage;
16268    const ID: u32 = 234u32;
16269    const NAME: &'static str = "HIGH_LATENCY";
16270    const EXTRA_CRC: u8 = 150u8;
16271    const ENCODED_LEN: usize = 40usize;
16272    fn deser(
16273        _version: MavlinkVersion,
16274        __input: &[u8],
16275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16276        let avail_len = __input.len();
16277        let mut payload_buf = [0; Self::ENCODED_LEN];
16278        let mut buf = if avail_len < Self::ENCODED_LEN {
16279            payload_buf[0..avail_len].copy_from_slice(__input);
16280            Bytes::new(&payload_buf)
16281        } else {
16282            Bytes::new(__input)
16283        };
16284        let mut __struct = Self::default();
16285        __struct.custom_mode = buf.get_u32_le();
16286        __struct.latitude = buf.get_i32_le();
16287        __struct.longitude = buf.get_i32_le();
16288        __struct.roll = buf.get_i16_le();
16289        __struct.pitch = buf.get_i16_le();
16290        __struct.heading = buf.get_u16_le();
16291        __struct.heading_sp = buf.get_i16_le();
16292        __struct.altitude_amsl = buf.get_i16_le();
16293        __struct.altitude_sp = buf.get_i16_le();
16294        __struct.wp_distance = buf.get_u16_le();
16295        let tmp = buf.get_u8();
16296        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16297            ::mavlink_core::error::ParserError::InvalidFlag {
16298                flag_type: "MavModeFlag",
16299                value: tmp as u32,
16300            },
16301        )?;
16302        let tmp = buf.get_u8();
16303        __struct.landed_state =
16304            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16305                enum_type: "MavLandedState",
16306                value: tmp as u32,
16307            })?;
16308        __struct.throttle = buf.get_i8();
16309        __struct.airspeed = buf.get_u8();
16310        __struct.airspeed_sp = buf.get_u8();
16311        __struct.groundspeed = buf.get_u8();
16312        __struct.climb_rate = buf.get_i8();
16313        __struct.gps_nsat = buf.get_u8();
16314        let tmp = buf.get_u8();
16315        __struct.gps_fix_type =
16316            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16317                enum_type: "GpsFixType",
16318                value: tmp as u32,
16319            })?;
16320        __struct.battery_remaining = buf.get_u8();
16321        __struct.temperature = buf.get_i8();
16322        __struct.temperature_air = buf.get_i8();
16323        __struct.failsafe = buf.get_u8();
16324        __struct.wp_num = buf.get_u8();
16325        Ok(__struct)
16326    }
16327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16328        let mut __tmp = BytesMut::new(bytes);
16329        #[allow(clippy::absurd_extreme_comparisons)]
16330        #[allow(unused_comparisons)]
16331        if __tmp.remaining() < Self::ENCODED_LEN {
16332            panic!(
16333                "buffer is too small (need {} bytes, but got {})",
16334                Self::ENCODED_LEN,
16335                __tmp.remaining(),
16336            )
16337        }
16338        __tmp.put_u32_le(self.custom_mode);
16339        __tmp.put_i32_le(self.latitude);
16340        __tmp.put_i32_le(self.longitude);
16341        __tmp.put_i16_le(self.roll);
16342        __tmp.put_i16_le(self.pitch);
16343        __tmp.put_u16_le(self.heading);
16344        __tmp.put_i16_le(self.heading_sp);
16345        __tmp.put_i16_le(self.altitude_amsl);
16346        __tmp.put_i16_le(self.altitude_sp);
16347        __tmp.put_u16_le(self.wp_distance);
16348        __tmp.put_u8(self.base_mode.bits());
16349        __tmp.put_u8(self.landed_state as u8);
16350        __tmp.put_i8(self.throttle);
16351        __tmp.put_u8(self.airspeed);
16352        __tmp.put_u8(self.airspeed_sp);
16353        __tmp.put_u8(self.groundspeed);
16354        __tmp.put_i8(self.climb_rate);
16355        __tmp.put_u8(self.gps_nsat);
16356        __tmp.put_u8(self.gps_fix_type as u8);
16357        __tmp.put_u8(self.battery_remaining);
16358        __tmp.put_i8(self.temperature);
16359        __tmp.put_i8(self.temperature_air);
16360        __tmp.put_u8(self.failsafe);
16361        __tmp.put_u8(self.wp_num);
16362        if matches!(version, MavlinkVersion::V2) {
16363            let len = __tmp.len();
16364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16365        } else {
16366            __tmp.len()
16367        }
16368    }
16369}
16370#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16371#[doc = ""]
16372#[doc = "ID: 235"]
16373#[derive(Debug, Clone, PartialEq)]
16374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16376#[cfg_attr(feature = "ts", derive(TS))]
16377#[cfg_attr(feature = "ts", ts(export))]
16378pub struct HIGH_LATENCY2_DATA {
16379    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16380    pub timestamp: u32,
16381    #[doc = "Latitude"]
16382    pub latitude: i32,
16383    #[doc = "Longitude"]
16384    pub longitude: i32,
16385    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16386    pub custom_mode: u16,
16387    #[doc = "Altitude above mean sea level"]
16388    pub altitude: i16,
16389    #[doc = "Altitude setpoint"]
16390    pub target_altitude: i16,
16391    #[doc = "Distance to target waypoint or position"]
16392    pub target_distance: u16,
16393    #[doc = "Current waypoint number"]
16394    pub wp_num: u16,
16395    #[doc = "Bitmap of failure flags."]
16396    pub failure_flags: HlFailureFlag,
16397    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16398    pub mavtype: MavType,
16399    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16400    pub autopilot: MavAutopilot,
16401    #[doc = "Heading"]
16402    pub heading: u8,
16403    #[doc = "Heading setpoint"]
16404    pub target_heading: u8,
16405    #[doc = "Throttle"]
16406    pub throttle: u8,
16407    #[doc = "Airspeed"]
16408    pub airspeed: u8,
16409    #[doc = "Airspeed setpoint"]
16410    pub airspeed_sp: u8,
16411    #[doc = "Groundspeed"]
16412    pub groundspeed: u8,
16413    #[doc = "Windspeed"]
16414    pub windspeed: u8,
16415    #[doc = "Wind heading"]
16416    pub wind_heading: u8,
16417    #[doc = "Maximum error horizontal position since last message"]
16418    pub eph: u8,
16419    #[doc = "Maximum error vertical position since last message"]
16420    pub epv: u8,
16421    #[doc = "Air temperature"]
16422    pub temperature_air: i8,
16423    #[doc = "Maximum climb rate magnitude since last message"]
16424    pub climb_rate: i8,
16425    #[doc = "Battery level (-1 if field not provided)."]
16426    pub battery: i8,
16427    #[doc = "Field for custom payload."]
16428    pub custom0: i8,
16429    #[doc = "Field for custom payload."]
16430    pub custom1: i8,
16431    #[doc = "Field for custom payload."]
16432    pub custom2: i8,
16433}
16434impl HIGH_LATENCY2_DATA {
16435    pub const ENCODED_LEN: usize = 42usize;
16436    pub const DEFAULT: Self = Self {
16437        timestamp: 0_u32,
16438        latitude: 0_i32,
16439        longitude: 0_i32,
16440        custom_mode: 0_u16,
16441        altitude: 0_i16,
16442        target_altitude: 0_i16,
16443        target_distance: 0_u16,
16444        wp_num: 0_u16,
16445        failure_flags: HlFailureFlag::DEFAULT,
16446        mavtype: MavType::DEFAULT,
16447        autopilot: MavAutopilot::DEFAULT,
16448        heading: 0_u8,
16449        target_heading: 0_u8,
16450        throttle: 0_u8,
16451        airspeed: 0_u8,
16452        airspeed_sp: 0_u8,
16453        groundspeed: 0_u8,
16454        windspeed: 0_u8,
16455        wind_heading: 0_u8,
16456        eph: 0_u8,
16457        epv: 0_u8,
16458        temperature_air: 0_i8,
16459        climb_rate: 0_i8,
16460        battery: 0_i8,
16461        custom0: 0_i8,
16462        custom1: 0_i8,
16463        custom2: 0_i8,
16464    };
16465    #[cfg(feature = "arbitrary")]
16466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16467        use arbitrary::{Arbitrary, Unstructured};
16468        let mut buf = [0u8; 1024];
16469        rng.fill_bytes(&mut buf);
16470        let mut unstructured = Unstructured::new(&buf);
16471        Self::arbitrary(&mut unstructured).unwrap_or_default()
16472    }
16473}
16474impl Default for HIGH_LATENCY2_DATA {
16475    fn default() -> Self {
16476        Self::DEFAULT.clone()
16477    }
16478}
16479impl MessageData for HIGH_LATENCY2_DATA {
16480    type Message = MavMessage;
16481    const ID: u32 = 235u32;
16482    const NAME: &'static str = "HIGH_LATENCY2";
16483    const EXTRA_CRC: u8 = 179u8;
16484    const ENCODED_LEN: usize = 42usize;
16485    fn deser(
16486        _version: MavlinkVersion,
16487        __input: &[u8],
16488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16489        let avail_len = __input.len();
16490        let mut payload_buf = [0; Self::ENCODED_LEN];
16491        let mut buf = if avail_len < Self::ENCODED_LEN {
16492            payload_buf[0..avail_len].copy_from_slice(__input);
16493            Bytes::new(&payload_buf)
16494        } else {
16495            Bytes::new(__input)
16496        };
16497        let mut __struct = Self::default();
16498        __struct.timestamp = buf.get_u32_le();
16499        __struct.latitude = buf.get_i32_le();
16500        __struct.longitude = buf.get_i32_le();
16501        __struct.custom_mode = buf.get_u16_le();
16502        __struct.altitude = buf.get_i16_le();
16503        __struct.target_altitude = buf.get_i16_le();
16504        __struct.target_distance = buf.get_u16_le();
16505        __struct.wp_num = buf.get_u16_le();
16506        let tmp = buf.get_u16_le();
16507        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16508            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16509                flag_type: "HlFailureFlag",
16510                value: tmp as u32,
16511            })?;
16512        let tmp = buf.get_u8();
16513        __struct.mavtype =
16514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16515                enum_type: "MavType",
16516                value: tmp as u32,
16517            })?;
16518        let tmp = buf.get_u8();
16519        __struct.autopilot =
16520            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16521                enum_type: "MavAutopilot",
16522                value: tmp as u32,
16523            })?;
16524        __struct.heading = buf.get_u8();
16525        __struct.target_heading = buf.get_u8();
16526        __struct.throttle = buf.get_u8();
16527        __struct.airspeed = buf.get_u8();
16528        __struct.airspeed_sp = buf.get_u8();
16529        __struct.groundspeed = buf.get_u8();
16530        __struct.windspeed = buf.get_u8();
16531        __struct.wind_heading = buf.get_u8();
16532        __struct.eph = buf.get_u8();
16533        __struct.epv = buf.get_u8();
16534        __struct.temperature_air = buf.get_i8();
16535        __struct.climb_rate = buf.get_i8();
16536        __struct.battery = buf.get_i8();
16537        __struct.custom0 = buf.get_i8();
16538        __struct.custom1 = buf.get_i8();
16539        __struct.custom2 = buf.get_i8();
16540        Ok(__struct)
16541    }
16542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16543        let mut __tmp = BytesMut::new(bytes);
16544        #[allow(clippy::absurd_extreme_comparisons)]
16545        #[allow(unused_comparisons)]
16546        if __tmp.remaining() < Self::ENCODED_LEN {
16547            panic!(
16548                "buffer is too small (need {} bytes, but got {})",
16549                Self::ENCODED_LEN,
16550                __tmp.remaining(),
16551            )
16552        }
16553        __tmp.put_u32_le(self.timestamp);
16554        __tmp.put_i32_le(self.latitude);
16555        __tmp.put_i32_le(self.longitude);
16556        __tmp.put_u16_le(self.custom_mode);
16557        __tmp.put_i16_le(self.altitude);
16558        __tmp.put_i16_le(self.target_altitude);
16559        __tmp.put_u16_le(self.target_distance);
16560        __tmp.put_u16_le(self.wp_num);
16561        __tmp.put_u16_le(self.failure_flags.bits());
16562        __tmp.put_u8(self.mavtype as u8);
16563        __tmp.put_u8(self.autopilot as u8);
16564        __tmp.put_u8(self.heading);
16565        __tmp.put_u8(self.target_heading);
16566        __tmp.put_u8(self.throttle);
16567        __tmp.put_u8(self.airspeed);
16568        __tmp.put_u8(self.airspeed_sp);
16569        __tmp.put_u8(self.groundspeed);
16570        __tmp.put_u8(self.windspeed);
16571        __tmp.put_u8(self.wind_heading);
16572        __tmp.put_u8(self.eph);
16573        __tmp.put_u8(self.epv);
16574        __tmp.put_i8(self.temperature_air);
16575        __tmp.put_i8(self.climb_rate);
16576        __tmp.put_i8(self.battery);
16577        __tmp.put_i8(self.custom0);
16578        __tmp.put_i8(self.custom1);
16579        __tmp.put_i8(self.custom2);
16580        if matches!(version, MavlinkVersion::V2) {
16581            let len = __tmp.len();
16582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16583        } else {
16584            __tmp.len()
16585        }
16586    }
16587}
16588#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16589#[doc = ""]
16590#[doc = "ID: 93"]
16591#[derive(Debug, Clone, PartialEq)]
16592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16594#[cfg_attr(feature = "ts", derive(TS))]
16595#[cfg_attr(feature = "ts", ts(export))]
16596pub struct HIL_ACTUATOR_CONTROLS_DATA {
16597    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16598    pub time_usec: u64,
16599    #[doc = "Flags bitmask."]
16600    pub flags: HilActuatorControlsFlags,
16601    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16602    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16603    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16604    pub controls: [f32; 16],
16605    #[doc = "System mode. Includes arming state."]
16606    pub mode: MavModeFlag,
16607}
16608impl HIL_ACTUATOR_CONTROLS_DATA {
16609    pub const ENCODED_LEN: usize = 81usize;
16610    pub const DEFAULT: Self = Self {
16611        time_usec: 0_u64,
16612        flags: HilActuatorControlsFlags::DEFAULT,
16613        controls: [0.0_f32; 16usize],
16614        mode: MavModeFlag::DEFAULT,
16615    };
16616    #[cfg(feature = "arbitrary")]
16617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16618        use arbitrary::{Arbitrary, Unstructured};
16619        let mut buf = [0u8; 1024];
16620        rng.fill_bytes(&mut buf);
16621        let mut unstructured = Unstructured::new(&buf);
16622        Self::arbitrary(&mut unstructured).unwrap_or_default()
16623    }
16624}
16625impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16626    fn default() -> Self {
16627        Self::DEFAULT.clone()
16628    }
16629}
16630impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16631    type Message = MavMessage;
16632    const ID: u32 = 93u32;
16633    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16634    const EXTRA_CRC: u8 = 47u8;
16635    const ENCODED_LEN: usize = 81usize;
16636    fn deser(
16637        _version: MavlinkVersion,
16638        __input: &[u8],
16639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16640        let avail_len = __input.len();
16641        let mut payload_buf = [0; Self::ENCODED_LEN];
16642        let mut buf = if avail_len < Self::ENCODED_LEN {
16643            payload_buf[0..avail_len].copy_from_slice(__input);
16644            Bytes::new(&payload_buf)
16645        } else {
16646            Bytes::new(__input)
16647        };
16648        let mut __struct = Self::default();
16649        __struct.time_usec = buf.get_u64_le();
16650        let tmp = buf.get_u64_le();
16651        __struct.flags =
16652            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16653                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16654                    flag_type: "HilActuatorControlsFlags",
16655                    value: tmp as u32,
16656                })?;
16657        for v in &mut __struct.controls {
16658            let val = buf.get_f32_le();
16659            *v = val;
16660        }
16661        let tmp = buf.get_u8();
16662        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16663            ::mavlink_core::error::ParserError::InvalidFlag {
16664                flag_type: "MavModeFlag",
16665                value: tmp as u32,
16666            },
16667        )?;
16668        Ok(__struct)
16669    }
16670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16671        let mut __tmp = BytesMut::new(bytes);
16672        #[allow(clippy::absurd_extreme_comparisons)]
16673        #[allow(unused_comparisons)]
16674        if __tmp.remaining() < Self::ENCODED_LEN {
16675            panic!(
16676                "buffer is too small (need {} bytes, but got {})",
16677                Self::ENCODED_LEN,
16678                __tmp.remaining(),
16679            )
16680        }
16681        __tmp.put_u64_le(self.time_usec);
16682        __tmp.put_u64_le(self.flags.bits());
16683        for val in &self.controls {
16684            __tmp.put_f32_le(*val);
16685        }
16686        __tmp.put_u8(self.mode.bits());
16687        if matches!(version, MavlinkVersion::V2) {
16688            let len = __tmp.len();
16689            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16690        } else {
16691            __tmp.len()
16692        }
16693    }
16694}
16695#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16696#[doc = ""]
16697#[doc = "ID: 91"]
16698#[derive(Debug, Clone, PartialEq)]
16699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16701#[cfg_attr(feature = "ts", derive(TS))]
16702#[cfg_attr(feature = "ts", ts(export))]
16703pub struct HIL_CONTROLS_DATA {
16704    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16705    pub time_usec: u64,
16706    #[doc = "Control output -1 .. 1"]
16707    pub roll_ailerons: f32,
16708    #[doc = "Control output -1 .. 1"]
16709    pub pitch_elevator: f32,
16710    #[doc = "Control output -1 .. 1"]
16711    pub yaw_rudder: f32,
16712    #[doc = "Throttle 0 .. 1"]
16713    pub throttle: f32,
16714    #[doc = "Aux 1, -1 .. 1"]
16715    pub aux1: f32,
16716    #[doc = "Aux 2, -1 .. 1"]
16717    pub aux2: f32,
16718    #[doc = "Aux 3, -1 .. 1"]
16719    pub aux3: f32,
16720    #[doc = "Aux 4, -1 .. 1"]
16721    pub aux4: f32,
16722    #[doc = "System mode."]
16723    pub mode: MavMode,
16724    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16725    pub nav_mode: u8,
16726}
16727impl HIL_CONTROLS_DATA {
16728    pub const ENCODED_LEN: usize = 42usize;
16729    pub const DEFAULT: Self = Self {
16730        time_usec: 0_u64,
16731        roll_ailerons: 0.0_f32,
16732        pitch_elevator: 0.0_f32,
16733        yaw_rudder: 0.0_f32,
16734        throttle: 0.0_f32,
16735        aux1: 0.0_f32,
16736        aux2: 0.0_f32,
16737        aux3: 0.0_f32,
16738        aux4: 0.0_f32,
16739        mode: MavMode::DEFAULT,
16740        nav_mode: 0_u8,
16741    };
16742    #[cfg(feature = "arbitrary")]
16743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16744        use arbitrary::{Arbitrary, Unstructured};
16745        let mut buf = [0u8; 1024];
16746        rng.fill_bytes(&mut buf);
16747        let mut unstructured = Unstructured::new(&buf);
16748        Self::arbitrary(&mut unstructured).unwrap_or_default()
16749    }
16750}
16751impl Default for HIL_CONTROLS_DATA {
16752    fn default() -> Self {
16753        Self::DEFAULT.clone()
16754    }
16755}
16756impl MessageData for HIL_CONTROLS_DATA {
16757    type Message = MavMessage;
16758    const ID: u32 = 91u32;
16759    const NAME: &'static str = "HIL_CONTROLS";
16760    const EXTRA_CRC: u8 = 63u8;
16761    const ENCODED_LEN: usize = 42usize;
16762    fn deser(
16763        _version: MavlinkVersion,
16764        __input: &[u8],
16765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16766        let avail_len = __input.len();
16767        let mut payload_buf = [0; Self::ENCODED_LEN];
16768        let mut buf = if avail_len < Self::ENCODED_LEN {
16769            payload_buf[0..avail_len].copy_from_slice(__input);
16770            Bytes::new(&payload_buf)
16771        } else {
16772            Bytes::new(__input)
16773        };
16774        let mut __struct = Self::default();
16775        __struct.time_usec = buf.get_u64_le();
16776        __struct.roll_ailerons = buf.get_f32_le();
16777        __struct.pitch_elevator = buf.get_f32_le();
16778        __struct.yaw_rudder = buf.get_f32_le();
16779        __struct.throttle = buf.get_f32_le();
16780        __struct.aux1 = buf.get_f32_le();
16781        __struct.aux2 = buf.get_f32_le();
16782        __struct.aux3 = buf.get_f32_le();
16783        __struct.aux4 = buf.get_f32_le();
16784        let tmp = buf.get_u8();
16785        __struct.mode =
16786            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16787                enum_type: "MavMode",
16788                value: tmp as u32,
16789            })?;
16790        __struct.nav_mode = buf.get_u8();
16791        Ok(__struct)
16792    }
16793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16794        let mut __tmp = BytesMut::new(bytes);
16795        #[allow(clippy::absurd_extreme_comparisons)]
16796        #[allow(unused_comparisons)]
16797        if __tmp.remaining() < Self::ENCODED_LEN {
16798            panic!(
16799                "buffer is too small (need {} bytes, but got {})",
16800                Self::ENCODED_LEN,
16801                __tmp.remaining(),
16802            )
16803        }
16804        __tmp.put_u64_le(self.time_usec);
16805        __tmp.put_f32_le(self.roll_ailerons);
16806        __tmp.put_f32_le(self.pitch_elevator);
16807        __tmp.put_f32_le(self.yaw_rudder);
16808        __tmp.put_f32_le(self.throttle);
16809        __tmp.put_f32_le(self.aux1);
16810        __tmp.put_f32_le(self.aux2);
16811        __tmp.put_f32_le(self.aux3);
16812        __tmp.put_f32_le(self.aux4);
16813        __tmp.put_u8(self.mode as u8);
16814        __tmp.put_u8(self.nav_mode);
16815        if matches!(version, MavlinkVersion::V2) {
16816            let len = __tmp.len();
16817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16818        } else {
16819            __tmp.len()
16820        }
16821    }
16822}
16823#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16824#[doc = ""]
16825#[doc = "ID: 113"]
16826#[derive(Debug, Clone, PartialEq)]
16827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16829#[cfg_attr(feature = "ts", derive(TS))]
16830#[cfg_attr(feature = "ts", ts(export))]
16831pub struct HIL_GPS_DATA {
16832    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16833    pub time_usec: u64,
16834    #[doc = "Latitude (WGS84)"]
16835    pub lat: i32,
16836    #[doc = "Longitude (WGS84)"]
16837    pub lon: i32,
16838    #[doc = "Altitude (MSL). Positive for up."]
16839    pub alt: i32,
16840    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16841    pub eph: u16,
16842    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16843    pub epv: u16,
16844    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16845    pub vel: u16,
16846    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16847    pub vn: i16,
16848    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16849    pub ve: i16,
16850    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16851    pub vd: i16,
16852    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16853    pub cog: u16,
16854    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16855    pub fix_type: u8,
16856    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16857    pub satellites_visible: u8,
16858    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16859    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16860    pub id: u8,
16861    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16862    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16863    pub yaw: u16,
16864}
16865impl HIL_GPS_DATA {
16866    pub const ENCODED_LEN: usize = 39usize;
16867    pub const DEFAULT: Self = Self {
16868        time_usec: 0_u64,
16869        lat: 0_i32,
16870        lon: 0_i32,
16871        alt: 0_i32,
16872        eph: 0_u16,
16873        epv: 0_u16,
16874        vel: 0_u16,
16875        vn: 0_i16,
16876        ve: 0_i16,
16877        vd: 0_i16,
16878        cog: 0_u16,
16879        fix_type: 0_u8,
16880        satellites_visible: 0_u8,
16881        id: 0_u8,
16882        yaw: 0_u16,
16883    };
16884    #[cfg(feature = "arbitrary")]
16885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16886        use arbitrary::{Arbitrary, Unstructured};
16887        let mut buf = [0u8; 1024];
16888        rng.fill_bytes(&mut buf);
16889        let mut unstructured = Unstructured::new(&buf);
16890        Self::arbitrary(&mut unstructured).unwrap_or_default()
16891    }
16892}
16893impl Default for HIL_GPS_DATA {
16894    fn default() -> Self {
16895        Self::DEFAULT.clone()
16896    }
16897}
16898impl MessageData for HIL_GPS_DATA {
16899    type Message = MavMessage;
16900    const ID: u32 = 113u32;
16901    const NAME: &'static str = "HIL_GPS";
16902    const EXTRA_CRC: u8 = 124u8;
16903    const ENCODED_LEN: usize = 39usize;
16904    fn deser(
16905        _version: MavlinkVersion,
16906        __input: &[u8],
16907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16908        let avail_len = __input.len();
16909        let mut payload_buf = [0; Self::ENCODED_LEN];
16910        let mut buf = if avail_len < Self::ENCODED_LEN {
16911            payload_buf[0..avail_len].copy_from_slice(__input);
16912            Bytes::new(&payload_buf)
16913        } else {
16914            Bytes::new(__input)
16915        };
16916        let mut __struct = Self::default();
16917        __struct.time_usec = buf.get_u64_le();
16918        __struct.lat = buf.get_i32_le();
16919        __struct.lon = buf.get_i32_le();
16920        __struct.alt = buf.get_i32_le();
16921        __struct.eph = buf.get_u16_le();
16922        __struct.epv = buf.get_u16_le();
16923        __struct.vel = buf.get_u16_le();
16924        __struct.vn = buf.get_i16_le();
16925        __struct.ve = buf.get_i16_le();
16926        __struct.vd = buf.get_i16_le();
16927        __struct.cog = buf.get_u16_le();
16928        __struct.fix_type = buf.get_u8();
16929        __struct.satellites_visible = buf.get_u8();
16930        __struct.id = buf.get_u8();
16931        __struct.yaw = buf.get_u16_le();
16932        Ok(__struct)
16933    }
16934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16935        let mut __tmp = BytesMut::new(bytes);
16936        #[allow(clippy::absurd_extreme_comparisons)]
16937        #[allow(unused_comparisons)]
16938        if __tmp.remaining() < Self::ENCODED_LEN {
16939            panic!(
16940                "buffer is too small (need {} bytes, but got {})",
16941                Self::ENCODED_LEN,
16942                __tmp.remaining(),
16943            )
16944        }
16945        __tmp.put_u64_le(self.time_usec);
16946        __tmp.put_i32_le(self.lat);
16947        __tmp.put_i32_le(self.lon);
16948        __tmp.put_i32_le(self.alt);
16949        __tmp.put_u16_le(self.eph);
16950        __tmp.put_u16_le(self.epv);
16951        __tmp.put_u16_le(self.vel);
16952        __tmp.put_i16_le(self.vn);
16953        __tmp.put_i16_le(self.ve);
16954        __tmp.put_i16_le(self.vd);
16955        __tmp.put_u16_le(self.cog);
16956        __tmp.put_u8(self.fix_type);
16957        __tmp.put_u8(self.satellites_visible);
16958        if matches!(version, MavlinkVersion::V2) {
16959            __tmp.put_u8(self.id);
16960            __tmp.put_u16_le(self.yaw);
16961            let len = __tmp.len();
16962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16963        } else {
16964            __tmp.len()
16965        }
16966    }
16967}
16968#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16969#[doc = ""]
16970#[doc = "ID: 114"]
16971#[derive(Debug, Clone, PartialEq)]
16972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16974#[cfg_attr(feature = "ts", derive(TS))]
16975#[cfg_attr(feature = "ts", ts(export))]
16976pub struct HIL_OPTICAL_FLOW_DATA {
16977    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16978    pub time_usec: u64,
16979    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16980    pub integration_time_us: u32,
16981    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16982    pub integrated_x: f32,
16983    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16984    pub integrated_y: f32,
16985    #[doc = "RH rotation around X axis"]
16986    pub integrated_xgyro: f32,
16987    #[doc = "RH rotation around Y axis"]
16988    pub integrated_ygyro: f32,
16989    #[doc = "RH rotation around Z axis"]
16990    pub integrated_zgyro: f32,
16991    #[doc = "Time since the distance was sampled."]
16992    pub time_delta_distance_us: u32,
16993    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16994    pub distance: f32,
16995    #[doc = "Temperature"]
16996    pub temperature: i16,
16997    #[doc = "Sensor ID"]
16998    pub sensor_id: u8,
16999    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
17000    pub quality: u8,
17001}
17002impl HIL_OPTICAL_FLOW_DATA {
17003    pub const ENCODED_LEN: usize = 44usize;
17004    pub const DEFAULT: Self = Self {
17005        time_usec: 0_u64,
17006        integration_time_us: 0_u32,
17007        integrated_x: 0.0_f32,
17008        integrated_y: 0.0_f32,
17009        integrated_xgyro: 0.0_f32,
17010        integrated_ygyro: 0.0_f32,
17011        integrated_zgyro: 0.0_f32,
17012        time_delta_distance_us: 0_u32,
17013        distance: 0.0_f32,
17014        temperature: 0_i16,
17015        sensor_id: 0_u8,
17016        quality: 0_u8,
17017    };
17018    #[cfg(feature = "arbitrary")]
17019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17020        use arbitrary::{Arbitrary, Unstructured};
17021        let mut buf = [0u8; 1024];
17022        rng.fill_bytes(&mut buf);
17023        let mut unstructured = Unstructured::new(&buf);
17024        Self::arbitrary(&mut unstructured).unwrap_or_default()
17025    }
17026}
17027impl Default for HIL_OPTICAL_FLOW_DATA {
17028    fn default() -> Self {
17029        Self::DEFAULT.clone()
17030    }
17031}
17032impl MessageData for HIL_OPTICAL_FLOW_DATA {
17033    type Message = MavMessage;
17034    const ID: u32 = 114u32;
17035    const NAME: &'static str = "HIL_OPTICAL_FLOW";
17036    const EXTRA_CRC: u8 = 237u8;
17037    const ENCODED_LEN: usize = 44usize;
17038    fn deser(
17039        _version: MavlinkVersion,
17040        __input: &[u8],
17041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17042        let avail_len = __input.len();
17043        let mut payload_buf = [0; Self::ENCODED_LEN];
17044        let mut buf = if avail_len < Self::ENCODED_LEN {
17045            payload_buf[0..avail_len].copy_from_slice(__input);
17046            Bytes::new(&payload_buf)
17047        } else {
17048            Bytes::new(__input)
17049        };
17050        let mut __struct = Self::default();
17051        __struct.time_usec = buf.get_u64_le();
17052        __struct.integration_time_us = buf.get_u32_le();
17053        __struct.integrated_x = buf.get_f32_le();
17054        __struct.integrated_y = buf.get_f32_le();
17055        __struct.integrated_xgyro = buf.get_f32_le();
17056        __struct.integrated_ygyro = buf.get_f32_le();
17057        __struct.integrated_zgyro = buf.get_f32_le();
17058        __struct.time_delta_distance_us = buf.get_u32_le();
17059        __struct.distance = buf.get_f32_le();
17060        __struct.temperature = buf.get_i16_le();
17061        __struct.sensor_id = buf.get_u8();
17062        __struct.quality = buf.get_u8();
17063        Ok(__struct)
17064    }
17065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17066        let mut __tmp = BytesMut::new(bytes);
17067        #[allow(clippy::absurd_extreme_comparisons)]
17068        #[allow(unused_comparisons)]
17069        if __tmp.remaining() < Self::ENCODED_LEN {
17070            panic!(
17071                "buffer is too small (need {} bytes, but got {})",
17072                Self::ENCODED_LEN,
17073                __tmp.remaining(),
17074            )
17075        }
17076        __tmp.put_u64_le(self.time_usec);
17077        __tmp.put_u32_le(self.integration_time_us);
17078        __tmp.put_f32_le(self.integrated_x);
17079        __tmp.put_f32_le(self.integrated_y);
17080        __tmp.put_f32_le(self.integrated_xgyro);
17081        __tmp.put_f32_le(self.integrated_ygyro);
17082        __tmp.put_f32_le(self.integrated_zgyro);
17083        __tmp.put_u32_le(self.time_delta_distance_us);
17084        __tmp.put_f32_le(self.distance);
17085        __tmp.put_i16_le(self.temperature);
17086        __tmp.put_u8(self.sensor_id);
17087        __tmp.put_u8(self.quality);
17088        if matches!(version, MavlinkVersion::V2) {
17089            let len = __tmp.len();
17090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17091        } else {
17092            __tmp.len()
17093        }
17094    }
17095}
17096#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
17097#[doc = ""]
17098#[doc = "ID: 92"]
17099#[derive(Debug, Clone, PartialEq)]
17100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17102#[cfg_attr(feature = "ts", derive(TS))]
17103#[cfg_attr(feature = "ts", ts(export))]
17104pub struct HIL_RC_INPUTS_RAW_DATA {
17105    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17106    pub time_usec: u64,
17107    #[doc = "RC channel 1 value"]
17108    pub chan1_raw: u16,
17109    #[doc = "RC channel 2 value"]
17110    pub chan2_raw: u16,
17111    #[doc = "RC channel 3 value"]
17112    pub chan3_raw: u16,
17113    #[doc = "RC channel 4 value"]
17114    pub chan4_raw: u16,
17115    #[doc = "RC channel 5 value"]
17116    pub chan5_raw: u16,
17117    #[doc = "RC channel 6 value"]
17118    pub chan6_raw: u16,
17119    #[doc = "RC channel 7 value"]
17120    pub chan7_raw: u16,
17121    #[doc = "RC channel 8 value"]
17122    pub chan8_raw: u16,
17123    #[doc = "RC channel 9 value"]
17124    pub chan9_raw: u16,
17125    #[doc = "RC channel 10 value"]
17126    pub chan10_raw: u16,
17127    #[doc = "RC channel 11 value"]
17128    pub chan11_raw: u16,
17129    #[doc = "RC channel 12 value"]
17130    pub chan12_raw: u16,
17131    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17132    pub rssi: u8,
17133}
17134impl HIL_RC_INPUTS_RAW_DATA {
17135    pub const ENCODED_LEN: usize = 33usize;
17136    pub const DEFAULT: Self = Self {
17137        time_usec: 0_u64,
17138        chan1_raw: 0_u16,
17139        chan2_raw: 0_u16,
17140        chan3_raw: 0_u16,
17141        chan4_raw: 0_u16,
17142        chan5_raw: 0_u16,
17143        chan6_raw: 0_u16,
17144        chan7_raw: 0_u16,
17145        chan8_raw: 0_u16,
17146        chan9_raw: 0_u16,
17147        chan10_raw: 0_u16,
17148        chan11_raw: 0_u16,
17149        chan12_raw: 0_u16,
17150        rssi: 0_u8,
17151    };
17152    #[cfg(feature = "arbitrary")]
17153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17154        use arbitrary::{Arbitrary, Unstructured};
17155        let mut buf = [0u8; 1024];
17156        rng.fill_bytes(&mut buf);
17157        let mut unstructured = Unstructured::new(&buf);
17158        Self::arbitrary(&mut unstructured).unwrap_or_default()
17159    }
17160}
17161impl Default for HIL_RC_INPUTS_RAW_DATA {
17162    fn default() -> Self {
17163        Self::DEFAULT.clone()
17164    }
17165}
17166impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17167    type Message = MavMessage;
17168    const ID: u32 = 92u32;
17169    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17170    const EXTRA_CRC: u8 = 54u8;
17171    const ENCODED_LEN: usize = 33usize;
17172    fn deser(
17173        _version: MavlinkVersion,
17174        __input: &[u8],
17175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17176        let avail_len = __input.len();
17177        let mut payload_buf = [0; Self::ENCODED_LEN];
17178        let mut buf = if avail_len < Self::ENCODED_LEN {
17179            payload_buf[0..avail_len].copy_from_slice(__input);
17180            Bytes::new(&payload_buf)
17181        } else {
17182            Bytes::new(__input)
17183        };
17184        let mut __struct = Self::default();
17185        __struct.time_usec = buf.get_u64_le();
17186        __struct.chan1_raw = buf.get_u16_le();
17187        __struct.chan2_raw = buf.get_u16_le();
17188        __struct.chan3_raw = buf.get_u16_le();
17189        __struct.chan4_raw = buf.get_u16_le();
17190        __struct.chan5_raw = buf.get_u16_le();
17191        __struct.chan6_raw = buf.get_u16_le();
17192        __struct.chan7_raw = buf.get_u16_le();
17193        __struct.chan8_raw = buf.get_u16_le();
17194        __struct.chan9_raw = buf.get_u16_le();
17195        __struct.chan10_raw = buf.get_u16_le();
17196        __struct.chan11_raw = buf.get_u16_le();
17197        __struct.chan12_raw = buf.get_u16_le();
17198        __struct.rssi = buf.get_u8();
17199        Ok(__struct)
17200    }
17201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17202        let mut __tmp = BytesMut::new(bytes);
17203        #[allow(clippy::absurd_extreme_comparisons)]
17204        #[allow(unused_comparisons)]
17205        if __tmp.remaining() < Self::ENCODED_LEN {
17206            panic!(
17207                "buffer is too small (need {} bytes, but got {})",
17208                Self::ENCODED_LEN,
17209                __tmp.remaining(),
17210            )
17211        }
17212        __tmp.put_u64_le(self.time_usec);
17213        __tmp.put_u16_le(self.chan1_raw);
17214        __tmp.put_u16_le(self.chan2_raw);
17215        __tmp.put_u16_le(self.chan3_raw);
17216        __tmp.put_u16_le(self.chan4_raw);
17217        __tmp.put_u16_le(self.chan5_raw);
17218        __tmp.put_u16_le(self.chan6_raw);
17219        __tmp.put_u16_le(self.chan7_raw);
17220        __tmp.put_u16_le(self.chan8_raw);
17221        __tmp.put_u16_le(self.chan9_raw);
17222        __tmp.put_u16_le(self.chan10_raw);
17223        __tmp.put_u16_le(self.chan11_raw);
17224        __tmp.put_u16_le(self.chan12_raw);
17225        __tmp.put_u8(self.rssi);
17226        if matches!(version, MavlinkVersion::V2) {
17227            let len = __tmp.len();
17228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17229        } else {
17230            __tmp.len()
17231        }
17232    }
17233}
17234#[doc = "The IMU readings in SI units in NED body frame."]
17235#[doc = ""]
17236#[doc = "ID: 107"]
17237#[derive(Debug, Clone, PartialEq)]
17238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17240#[cfg_attr(feature = "ts", derive(TS))]
17241#[cfg_attr(feature = "ts", ts(export))]
17242pub struct HIL_SENSOR_DATA {
17243    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17244    pub time_usec: u64,
17245    #[doc = "X acceleration"]
17246    pub xacc: f32,
17247    #[doc = "Y acceleration"]
17248    pub yacc: f32,
17249    #[doc = "Z acceleration"]
17250    pub zacc: f32,
17251    #[doc = "Angular speed around X axis in body frame"]
17252    pub xgyro: f32,
17253    #[doc = "Angular speed around Y axis in body frame"]
17254    pub ygyro: f32,
17255    #[doc = "Angular speed around Z axis in body frame"]
17256    pub zgyro: f32,
17257    #[doc = "X Magnetic field"]
17258    pub xmag: f32,
17259    #[doc = "Y Magnetic field"]
17260    pub ymag: f32,
17261    #[doc = "Z Magnetic field"]
17262    pub zmag: f32,
17263    #[doc = "Absolute pressure"]
17264    pub abs_pressure: f32,
17265    #[doc = "Differential pressure (airspeed)"]
17266    pub diff_pressure: f32,
17267    #[doc = "Altitude calculated from pressure"]
17268    pub pressure_alt: f32,
17269    #[doc = "Temperature"]
17270    pub temperature: f32,
17271    #[doc = "Bitmap for fields that have updated since last message"]
17272    pub fields_updated: HilSensorUpdatedFlags,
17273    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17274    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17275    pub id: u8,
17276}
17277impl HIL_SENSOR_DATA {
17278    pub const ENCODED_LEN: usize = 65usize;
17279    pub const DEFAULT: Self = Self {
17280        time_usec: 0_u64,
17281        xacc: 0.0_f32,
17282        yacc: 0.0_f32,
17283        zacc: 0.0_f32,
17284        xgyro: 0.0_f32,
17285        ygyro: 0.0_f32,
17286        zgyro: 0.0_f32,
17287        xmag: 0.0_f32,
17288        ymag: 0.0_f32,
17289        zmag: 0.0_f32,
17290        abs_pressure: 0.0_f32,
17291        diff_pressure: 0.0_f32,
17292        pressure_alt: 0.0_f32,
17293        temperature: 0.0_f32,
17294        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17295        id: 0_u8,
17296    };
17297    #[cfg(feature = "arbitrary")]
17298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17299        use arbitrary::{Arbitrary, Unstructured};
17300        let mut buf = [0u8; 1024];
17301        rng.fill_bytes(&mut buf);
17302        let mut unstructured = Unstructured::new(&buf);
17303        Self::arbitrary(&mut unstructured).unwrap_or_default()
17304    }
17305}
17306impl Default for HIL_SENSOR_DATA {
17307    fn default() -> Self {
17308        Self::DEFAULT.clone()
17309    }
17310}
17311impl MessageData for HIL_SENSOR_DATA {
17312    type Message = MavMessage;
17313    const ID: u32 = 107u32;
17314    const NAME: &'static str = "HIL_SENSOR";
17315    const EXTRA_CRC: u8 = 108u8;
17316    const ENCODED_LEN: usize = 65usize;
17317    fn deser(
17318        _version: MavlinkVersion,
17319        __input: &[u8],
17320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17321        let avail_len = __input.len();
17322        let mut payload_buf = [0; Self::ENCODED_LEN];
17323        let mut buf = if avail_len < Self::ENCODED_LEN {
17324            payload_buf[0..avail_len].copy_from_slice(__input);
17325            Bytes::new(&payload_buf)
17326        } else {
17327            Bytes::new(__input)
17328        };
17329        let mut __struct = Self::default();
17330        __struct.time_usec = buf.get_u64_le();
17331        __struct.xacc = buf.get_f32_le();
17332        __struct.yacc = buf.get_f32_le();
17333        __struct.zacc = buf.get_f32_le();
17334        __struct.xgyro = buf.get_f32_le();
17335        __struct.ygyro = buf.get_f32_le();
17336        __struct.zgyro = buf.get_f32_le();
17337        __struct.xmag = buf.get_f32_le();
17338        __struct.ymag = buf.get_f32_le();
17339        __struct.zmag = buf.get_f32_le();
17340        __struct.abs_pressure = buf.get_f32_le();
17341        __struct.diff_pressure = buf.get_f32_le();
17342        __struct.pressure_alt = buf.get_f32_le();
17343        __struct.temperature = buf.get_f32_le();
17344        let tmp = buf.get_u32_le();
17345        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17346            tmp & HilSensorUpdatedFlags::all().bits(),
17347        )
17348        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17349            flag_type: "HilSensorUpdatedFlags",
17350            value: tmp as u32,
17351        })?;
17352        __struct.id = buf.get_u8();
17353        Ok(__struct)
17354    }
17355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17356        let mut __tmp = BytesMut::new(bytes);
17357        #[allow(clippy::absurd_extreme_comparisons)]
17358        #[allow(unused_comparisons)]
17359        if __tmp.remaining() < Self::ENCODED_LEN {
17360            panic!(
17361                "buffer is too small (need {} bytes, but got {})",
17362                Self::ENCODED_LEN,
17363                __tmp.remaining(),
17364            )
17365        }
17366        __tmp.put_u64_le(self.time_usec);
17367        __tmp.put_f32_le(self.xacc);
17368        __tmp.put_f32_le(self.yacc);
17369        __tmp.put_f32_le(self.zacc);
17370        __tmp.put_f32_le(self.xgyro);
17371        __tmp.put_f32_le(self.ygyro);
17372        __tmp.put_f32_le(self.zgyro);
17373        __tmp.put_f32_le(self.xmag);
17374        __tmp.put_f32_le(self.ymag);
17375        __tmp.put_f32_le(self.zmag);
17376        __tmp.put_f32_le(self.abs_pressure);
17377        __tmp.put_f32_le(self.diff_pressure);
17378        __tmp.put_f32_le(self.pressure_alt);
17379        __tmp.put_f32_le(self.temperature);
17380        __tmp.put_u32_le(self.fields_updated.bits());
17381        if matches!(version, MavlinkVersion::V2) {
17382            __tmp.put_u8(self.id);
17383            let len = __tmp.len();
17384            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17385        } else {
17386            __tmp.len()
17387        }
17388    }
17389}
17390#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17391#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17392#[doc = ""]
17393#[doc = "ID: 90"]
17394#[derive(Debug, Clone, PartialEq)]
17395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17397#[cfg_attr(feature = "ts", derive(TS))]
17398#[cfg_attr(feature = "ts", ts(export))]
17399pub struct HIL_STATE_DATA {
17400    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17401    pub time_usec: u64,
17402    #[doc = "Roll angle"]
17403    pub roll: f32,
17404    #[doc = "Pitch angle"]
17405    pub pitch: f32,
17406    #[doc = "Yaw angle"]
17407    pub yaw: f32,
17408    #[doc = "Body frame roll / phi angular speed"]
17409    pub rollspeed: f32,
17410    #[doc = "Body frame pitch / theta angular speed"]
17411    pub pitchspeed: f32,
17412    #[doc = "Body frame yaw / psi angular speed"]
17413    pub yawspeed: f32,
17414    #[doc = "Latitude"]
17415    pub lat: i32,
17416    #[doc = "Longitude"]
17417    pub lon: i32,
17418    #[doc = "Altitude"]
17419    pub alt: i32,
17420    #[doc = "Ground X Speed (Latitude)"]
17421    pub vx: i16,
17422    #[doc = "Ground Y Speed (Longitude)"]
17423    pub vy: i16,
17424    #[doc = "Ground Z Speed (Altitude)"]
17425    pub vz: i16,
17426    #[doc = "X acceleration"]
17427    pub xacc: i16,
17428    #[doc = "Y acceleration"]
17429    pub yacc: i16,
17430    #[doc = "Z acceleration"]
17431    pub zacc: i16,
17432}
17433impl HIL_STATE_DATA {
17434    pub const ENCODED_LEN: usize = 56usize;
17435    pub const DEFAULT: Self = Self {
17436        time_usec: 0_u64,
17437        roll: 0.0_f32,
17438        pitch: 0.0_f32,
17439        yaw: 0.0_f32,
17440        rollspeed: 0.0_f32,
17441        pitchspeed: 0.0_f32,
17442        yawspeed: 0.0_f32,
17443        lat: 0_i32,
17444        lon: 0_i32,
17445        alt: 0_i32,
17446        vx: 0_i16,
17447        vy: 0_i16,
17448        vz: 0_i16,
17449        xacc: 0_i16,
17450        yacc: 0_i16,
17451        zacc: 0_i16,
17452    };
17453    #[cfg(feature = "arbitrary")]
17454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17455        use arbitrary::{Arbitrary, Unstructured};
17456        let mut buf = [0u8; 1024];
17457        rng.fill_bytes(&mut buf);
17458        let mut unstructured = Unstructured::new(&buf);
17459        Self::arbitrary(&mut unstructured).unwrap_or_default()
17460    }
17461}
17462impl Default for HIL_STATE_DATA {
17463    fn default() -> Self {
17464        Self::DEFAULT.clone()
17465    }
17466}
17467impl MessageData for HIL_STATE_DATA {
17468    type Message = MavMessage;
17469    const ID: u32 = 90u32;
17470    const NAME: &'static str = "HIL_STATE";
17471    const EXTRA_CRC: u8 = 183u8;
17472    const ENCODED_LEN: usize = 56usize;
17473    fn deser(
17474        _version: MavlinkVersion,
17475        __input: &[u8],
17476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17477        let avail_len = __input.len();
17478        let mut payload_buf = [0; Self::ENCODED_LEN];
17479        let mut buf = if avail_len < Self::ENCODED_LEN {
17480            payload_buf[0..avail_len].copy_from_slice(__input);
17481            Bytes::new(&payload_buf)
17482        } else {
17483            Bytes::new(__input)
17484        };
17485        let mut __struct = Self::default();
17486        __struct.time_usec = buf.get_u64_le();
17487        __struct.roll = buf.get_f32_le();
17488        __struct.pitch = buf.get_f32_le();
17489        __struct.yaw = buf.get_f32_le();
17490        __struct.rollspeed = buf.get_f32_le();
17491        __struct.pitchspeed = buf.get_f32_le();
17492        __struct.yawspeed = buf.get_f32_le();
17493        __struct.lat = buf.get_i32_le();
17494        __struct.lon = buf.get_i32_le();
17495        __struct.alt = buf.get_i32_le();
17496        __struct.vx = buf.get_i16_le();
17497        __struct.vy = buf.get_i16_le();
17498        __struct.vz = buf.get_i16_le();
17499        __struct.xacc = buf.get_i16_le();
17500        __struct.yacc = buf.get_i16_le();
17501        __struct.zacc = buf.get_i16_le();
17502        Ok(__struct)
17503    }
17504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17505        let mut __tmp = BytesMut::new(bytes);
17506        #[allow(clippy::absurd_extreme_comparisons)]
17507        #[allow(unused_comparisons)]
17508        if __tmp.remaining() < Self::ENCODED_LEN {
17509            panic!(
17510                "buffer is too small (need {} bytes, but got {})",
17511                Self::ENCODED_LEN,
17512                __tmp.remaining(),
17513            )
17514        }
17515        __tmp.put_u64_le(self.time_usec);
17516        __tmp.put_f32_le(self.roll);
17517        __tmp.put_f32_le(self.pitch);
17518        __tmp.put_f32_le(self.yaw);
17519        __tmp.put_f32_le(self.rollspeed);
17520        __tmp.put_f32_le(self.pitchspeed);
17521        __tmp.put_f32_le(self.yawspeed);
17522        __tmp.put_i32_le(self.lat);
17523        __tmp.put_i32_le(self.lon);
17524        __tmp.put_i32_le(self.alt);
17525        __tmp.put_i16_le(self.vx);
17526        __tmp.put_i16_le(self.vy);
17527        __tmp.put_i16_le(self.vz);
17528        __tmp.put_i16_le(self.xacc);
17529        __tmp.put_i16_le(self.yacc);
17530        __tmp.put_i16_le(self.zacc);
17531        if matches!(version, MavlinkVersion::V2) {
17532            let len = __tmp.len();
17533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17534        } else {
17535            __tmp.len()
17536        }
17537    }
17538}
17539#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17540#[doc = ""]
17541#[doc = "ID: 115"]
17542#[derive(Debug, Clone, PartialEq)]
17543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17545#[cfg_attr(feature = "ts", derive(TS))]
17546#[cfg_attr(feature = "ts", ts(export))]
17547pub struct HIL_STATE_QUATERNION_DATA {
17548    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17549    pub time_usec: u64,
17550    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17551    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17552    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17553    pub attitude_quaternion: [f32; 4],
17554    #[doc = "Body frame roll / phi angular speed"]
17555    pub rollspeed: f32,
17556    #[doc = "Body frame pitch / theta angular speed"]
17557    pub pitchspeed: f32,
17558    #[doc = "Body frame yaw / psi angular speed"]
17559    pub yawspeed: f32,
17560    #[doc = "Latitude"]
17561    pub lat: i32,
17562    #[doc = "Longitude"]
17563    pub lon: i32,
17564    #[doc = "Altitude"]
17565    pub alt: i32,
17566    #[doc = "Ground X Speed (Latitude)"]
17567    pub vx: i16,
17568    #[doc = "Ground Y Speed (Longitude)"]
17569    pub vy: i16,
17570    #[doc = "Ground Z Speed (Altitude)"]
17571    pub vz: i16,
17572    #[doc = "Indicated airspeed"]
17573    pub ind_airspeed: u16,
17574    #[doc = "True airspeed"]
17575    pub true_airspeed: u16,
17576    #[doc = "X acceleration"]
17577    pub xacc: i16,
17578    #[doc = "Y acceleration"]
17579    pub yacc: i16,
17580    #[doc = "Z acceleration"]
17581    pub zacc: i16,
17582}
17583impl HIL_STATE_QUATERNION_DATA {
17584    pub const ENCODED_LEN: usize = 64usize;
17585    pub const DEFAULT: Self = Self {
17586        time_usec: 0_u64,
17587        attitude_quaternion: [0.0_f32; 4usize],
17588        rollspeed: 0.0_f32,
17589        pitchspeed: 0.0_f32,
17590        yawspeed: 0.0_f32,
17591        lat: 0_i32,
17592        lon: 0_i32,
17593        alt: 0_i32,
17594        vx: 0_i16,
17595        vy: 0_i16,
17596        vz: 0_i16,
17597        ind_airspeed: 0_u16,
17598        true_airspeed: 0_u16,
17599        xacc: 0_i16,
17600        yacc: 0_i16,
17601        zacc: 0_i16,
17602    };
17603    #[cfg(feature = "arbitrary")]
17604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17605        use arbitrary::{Arbitrary, Unstructured};
17606        let mut buf = [0u8; 1024];
17607        rng.fill_bytes(&mut buf);
17608        let mut unstructured = Unstructured::new(&buf);
17609        Self::arbitrary(&mut unstructured).unwrap_or_default()
17610    }
17611}
17612impl Default for HIL_STATE_QUATERNION_DATA {
17613    fn default() -> Self {
17614        Self::DEFAULT.clone()
17615    }
17616}
17617impl MessageData for HIL_STATE_QUATERNION_DATA {
17618    type Message = MavMessage;
17619    const ID: u32 = 115u32;
17620    const NAME: &'static str = "HIL_STATE_QUATERNION";
17621    const EXTRA_CRC: u8 = 4u8;
17622    const ENCODED_LEN: usize = 64usize;
17623    fn deser(
17624        _version: MavlinkVersion,
17625        __input: &[u8],
17626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17627        let avail_len = __input.len();
17628        let mut payload_buf = [0; Self::ENCODED_LEN];
17629        let mut buf = if avail_len < Self::ENCODED_LEN {
17630            payload_buf[0..avail_len].copy_from_slice(__input);
17631            Bytes::new(&payload_buf)
17632        } else {
17633            Bytes::new(__input)
17634        };
17635        let mut __struct = Self::default();
17636        __struct.time_usec = buf.get_u64_le();
17637        for v in &mut __struct.attitude_quaternion {
17638            let val = buf.get_f32_le();
17639            *v = val;
17640        }
17641        __struct.rollspeed = buf.get_f32_le();
17642        __struct.pitchspeed = buf.get_f32_le();
17643        __struct.yawspeed = buf.get_f32_le();
17644        __struct.lat = buf.get_i32_le();
17645        __struct.lon = buf.get_i32_le();
17646        __struct.alt = buf.get_i32_le();
17647        __struct.vx = buf.get_i16_le();
17648        __struct.vy = buf.get_i16_le();
17649        __struct.vz = buf.get_i16_le();
17650        __struct.ind_airspeed = buf.get_u16_le();
17651        __struct.true_airspeed = buf.get_u16_le();
17652        __struct.xacc = buf.get_i16_le();
17653        __struct.yacc = buf.get_i16_le();
17654        __struct.zacc = buf.get_i16_le();
17655        Ok(__struct)
17656    }
17657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17658        let mut __tmp = BytesMut::new(bytes);
17659        #[allow(clippy::absurd_extreme_comparisons)]
17660        #[allow(unused_comparisons)]
17661        if __tmp.remaining() < Self::ENCODED_LEN {
17662            panic!(
17663                "buffer is too small (need {} bytes, but got {})",
17664                Self::ENCODED_LEN,
17665                __tmp.remaining(),
17666            )
17667        }
17668        __tmp.put_u64_le(self.time_usec);
17669        for val in &self.attitude_quaternion {
17670            __tmp.put_f32_le(*val);
17671        }
17672        __tmp.put_f32_le(self.rollspeed);
17673        __tmp.put_f32_le(self.pitchspeed);
17674        __tmp.put_f32_le(self.yawspeed);
17675        __tmp.put_i32_le(self.lat);
17676        __tmp.put_i32_le(self.lon);
17677        __tmp.put_i32_le(self.alt);
17678        __tmp.put_i16_le(self.vx);
17679        __tmp.put_i16_le(self.vy);
17680        __tmp.put_i16_le(self.vz);
17681        __tmp.put_u16_le(self.ind_airspeed);
17682        __tmp.put_u16_le(self.true_airspeed);
17683        __tmp.put_i16_le(self.xacc);
17684        __tmp.put_i16_le(self.yacc);
17685        __tmp.put_i16_le(self.zacc);
17686        if matches!(version, MavlinkVersion::V2) {
17687            let len = __tmp.len();
17688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17689        } else {
17690            __tmp.len()
17691        }
17692    }
17693}
17694#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17695#[doc = ""]
17696#[doc = "ID: 242"]
17697#[derive(Debug, Clone, PartialEq)]
17698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17700#[cfg_attr(feature = "ts", derive(TS))]
17701#[cfg_attr(feature = "ts", ts(export))]
17702pub struct HOME_POSITION_DATA {
17703    #[doc = "Latitude (WGS84)"]
17704    pub latitude: i32,
17705    #[doc = "Longitude (WGS84)"]
17706    pub longitude: i32,
17707    #[doc = "Altitude (MSL). Positive for up."]
17708    pub altitude: i32,
17709    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17710    pub x: f32,
17711    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17712    pub y: f32,
17713    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17714    pub z: f32,
17715    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17718    pub q: [f32; 4],
17719    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17720    pub approach_x: f32,
17721    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17722    pub approach_y: f32,
17723    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17724    pub approach_z: f32,
17725    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17727    pub time_usec: u64,
17728}
17729impl HOME_POSITION_DATA {
17730    pub const ENCODED_LEN: usize = 60usize;
17731    pub const DEFAULT: Self = Self {
17732        latitude: 0_i32,
17733        longitude: 0_i32,
17734        altitude: 0_i32,
17735        x: 0.0_f32,
17736        y: 0.0_f32,
17737        z: 0.0_f32,
17738        q: [0.0_f32; 4usize],
17739        approach_x: 0.0_f32,
17740        approach_y: 0.0_f32,
17741        approach_z: 0.0_f32,
17742        time_usec: 0_u64,
17743    };
17744    #[cfg(feature = "arbitrary")]
17745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17746        use arbitrary::{Arbitrary, Unstructured};
17747        let mut buf = [0u8; 1024];
17748        rng.fill_bytes(&mut buf);
17749        let mut unstructured = Unstructured::new(&buf);
17750        Self::arbitrary(&mut unstructured).unwrap_or_default()
17751    }
17752}
17753impl Default for HOME_POSITION_DATA {
17754    fn default() -> Self {
17755        Self::DEFAULT.clone()
17756    }
17757}
17758impl MessageData for HOME_POSITION_DATA {
17759    type Message = MavMessage;
17760    const ID: u32 = 242u32;
17761    const NAME: &'static str = "HOME_POSITION";
17762    const EXTRA_CRC: u8 = 104u8;
17763    const ENCODED_LEN: usize = 60usize;
17764    fn deser(
17765        _version: MavlinkVersion,
17766        __input: &[u8],
17767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17768        let avail_len = __input.len();
17769        let mut payload_buf = [0; Self::ENCODED_LEN];
17770        let mut buf = if avail_len < Self::ENCODED_LEN {
17771            payload_buf[0..avail_len].copy_from_slice(__input);
17772            Bytes::new(&payload_buf)
17773        } else {
17774            Bytes::new(__input)
17775        };
17776        let mut __struct = Self::default();
17777        __struct.latitude = buf.get_i32_le();
17778        __struct.longitude = buf.get_i32_le();
17779        __struct.altitude = buf.get_i32_le();
17780        __struct.x = buf.get_f32_le();
17781        __struct.y = buf.get_f32_le();
17782        __struct.z = buf.get_f32_le();
17783        for v in &mut __struct.q {
17784            let val = buf.get_f32_le();
17785            *v = val;
17786        }
17787        __struct.approach_x = buf.get_f32_le();
17788        __struct.approach_y = buf.get_f32_le();
17789        __struct.approach_z = buf.get_f32_le();
17790        __struct.time_usec = buf.get_u64_le();
17791        Ok(__struct)
17792    }
17793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17794        let mut __tmp = BytesMut::new(bytes);
17795        #[allow(clippy::absurd_extreme_comparisons)]
17796        #[allow(unused_comparisons)]
17797        if __tmp.remaining() < Self::ENCODED_LEN {
17798            panic!(
17799                "buffer is too small (need {} bytes, but got {})",
17800                Self::ENCODED_LEN,
17801                __tmp.remaining(),
17802            )
17803        }
17804        __tmp.put_i32_le(self.latitude);
17805        __tmp.put_i32_le(self.longitude);
17806        __tmp.put_i32_le(self.altitude);
17807        __tmp.put_f32_le(self.x);
17808        __tmp.put_f32_le(self.y);
17809        __tmp.put_f32_le(self.z);
17810        for val in &self.q {
17811            __tmp.put_f32_le(*val);
17812        }
17813        __tmp.put_f32_le(self.approach_x);
17814        __tmp.put_f32_le(self.approach_y);
17815        __tmp.put_f32_le(self.approach_z);
17816        if matches!(version, MavlinkVersion::V2) {
17817            __tmp.put_u64_le(self.time_usec);
17818            let len = __tmp.len();
17819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17820        } else {
17821            __tmp.len()
17822        }
17823    }
17824}
17825#[doc = "Temperature and humidity from hygrometer."]
17826#[doc = ""]
17827#[doc = "ID: 12920"]
17828#[derive(Debug, Clone, PartialEq)]
17829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17831#[cfg_attr(feature = "ts", derive(TS))]
17832#[cfg_attr(feature = "ts", ts(export))]
17833pub struct HYGROMETER_SENSOR_DATA {
17834    #[doc = "Temperature"]
17835    pub temperature: i16,
17836    #[doc = "Humidity"]
17837    pub humidity: u16,
17838    #[doc = "Hygrometer ID"]
17839    pub id: u8,
17840}
17841impl HYGROMETER_SENSOR_DATA {
17842    pub const ENCODED_LEN: usize = 5usize;
17843    pub const DEFAULT: Self = Self {
17844        temperature: 0_i16,
17845        humidity: 0_u16,
17846        id: 0_u8,
17847    };
17848    #[cfg(feature = "arbitrary")]
17849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17850        use arbitrary::{Arbitrary, Unstructured};
17851        let mut buf = [0u8; 1024];
17852        rng.fill_bytes(&mut buf);
17853        let mut unstructured = Unstructured::new(&buf);
17854        Self::arbitrary(&mut unstructured).unwrap_or_default()
17855    }
17856}
17857impl Default for HYGROMETER_SENSOR_DATA {
17858    fn default() -> Self {
17859        Self::DEFAULT.clone()
17860    }
17861}
17862impl MessageData for HYGROMETER_SENSOR_DATA {
17863    type Message = MavMessage;
17864    const ID: u32 = 12920u32;
17865    const NAME: &'static str = "HYGROMETER_SENSOR";
17866    const EXTRA_CRC: u8 = 20u8;
17867    const ENCODED_LEN: usize = 5usize;
17868    fn deser(
17869        _version: MavlinkVersion,
17870        __input: &[u8],
17871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17872        let avail_len = __input.len();
17873        let mut payload_buf = [0; Self::ENCODED_LEN];
17874        let mut buf = if avail_len < Self::ENCODED_LEN {
17875            payload_buf[0..avail_len].copy_from_slice(__input);
17876            Bytes::new(&payload_buf)
17877        } else {
17878            Bytes::new(__input)
17879        };
17880        let mut __struct = Self::default();
17881        __struct.temperature = buf.get_i16_le();
17882        __struct.humidity = buf.get_u16_le();
17883        __struct.id = buf.get_u8();
17884        Ok(__struct)
17885    }
17886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17887        let mut __tmp = BytesMut::new(bytes);
17888        #[allow(clippy::absurd_extreme_comparisons)]
17889        #[allow(unused_comparisons)]
17890        if __tmp.remaining() < Self::ENCODED_LEN {
17891            panic!(
17892                "buffer is too small (need {} bytes, but got {})",
17893                Self::ENCODED_LEN,
17894                __tmp.remaining(),
17895            )
17896        }
17897        __tmp.put_i16_le(self.temperature);
17898        __tmp.put_u16_le(self.humidity);
17899        __tmp.put_u8(self.id);
17900        if matches!(version, MavlinkVersion::V2) {
17901            let len = __tmp.len();
17902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17903        } else {
17904            __tmp.len()
17905        }
17906    }
17907}
17908#[doc = "Illuminator status."]
17909#[doc = ""]
17910#[doc = "ID: 440"]
17911#[derive(Debug, Clone, PartialEq)]
17912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17914#[cfg_attr(feature = "ts", derive(TS))]
17915#[cfg_attr(feature = "ts", ts(export))]
17916pub struct ILLUMINATOR_STATUS_DATA {
17917    #[doc = "Time since the start-up of the illuminator in ms"]
17918    pub uptime_ms: u32,
17919    #[doc = "Errors"]
17920    pub error_status: IlluminatorErrorFlags,
17921    #[doc = "Illuminator brightness"]
17922    pub brightness: f32,
17923    #[doc = "Illuminator strobing period in seconds"]
17924    pub strobe_period: f32,
17925    #[doc = "Illuminator strobing duty cycle"]
17926    pub strobe_duty_cycle: f32,
17927    #[doc = "Temperature in Celsius"]
17928    pub temp_c: f32,
17929    #[doc = "Minimum strobing period in seconds"]
17930    pub min_strobe_period: f32,
17931    #[doc = "Maximum strobing period in seconds"]
17932    pub max_strobe_period: f32,
17933    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17934    pub enable: u8,
17935    #[doc = "Supported illuminator modes"]
17936    pub mode_bitmask: IlluminatorMode,
17937    #[doc = "Illuminator mode"]
17938    pub mode: IlluminatorMode,
17939}
17940impl ILLUMINATOR_STATUS_DATA {
17941    pub const ENCODED_LEN: usize = 35usize;
17942    pub const DEFAULT: Self = Self {
17943        uptime_ms: 0_u32,
17944        error_status: IlluminatorErrorFlags::DEFAULT,
17945        brightness: 0.0_f32,
17946        strobe_period: 0.0_f32,
17947        strobe_duty_cycle: 0.0_f32,
17948        temp_c: 0.0_f32,
17949        min_strobe_period: 0.0_f32,
17950        max_strobe_period: 0.0_f32,
17951        enable: 0_u8,
17952        mode_bitmask: IlluminatorMode::DEFAULT,
17953        mode: IlluminatorMode::DEFAULT,
17954    };
17955    #[cfg(feature = "arbitrary")]
17956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17957        use arbitrary::{Arbitrary, Unstructured};
17958        let mut buf = [0u8; 1024];
17959        rng.fill_bytes(&mut buf);
17960        let mut unstructured = Unstructured::new(&buf);
17961        Self::arbitrary(&mut unstructured).unwrap_or_default()
17962    }
17963}
17964impl Default for ILLUMINATOR_STATUS_DATA {
17965    fn default() -> Self {
17966        Self::DEFAULT.clone()
17967    }
17968}
17969impl MessageData for ILLUMINATOR_STATUS_DATA {
17970    type Message = MavMessage;
17971    const ID: u32 = 440u32;
17972    const NAME: &'static str = "ILLUMINATOR_STATUS";
17973    const EXTRA_CRC: u8 = 66u8;
17974    const ENCODED_LEN: usize = 35usize;
17975    fn deser(
17976        _version: MavlinkVersion,
17977        __input: &[u8],
17978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17979        let avail_len = __input.len();
17980        let mut payload_buf = [0; Self::ENCODED_LEN];
17981        let mut buf = if avail_len < Self::ENCODED_LEN {
17982            payload_buf[0..avail_len].copy_from_slice(__input);
17983            Bytes::new(&payload_buf)
17984        } else {
17985            Bytes::new(__input)
17986        };
17987        let mut __struct = Self::default();
17988        __struct.uptime_ms = buf.get_u32_le();
17989        let tmp = buf.get_u32_le();
17990        __struct.error_status = IlluminatorErrorFlags::from_bits(
17991            tmp & IlluminatorErrorFlags::all().bits(),
17992        )
17993        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17994            flag_type: "IlluminatorErrorFlags",
17995            value: tmp as u32,
17996        })?;
17997        __struct.brightness = buf.get_f32_le();
17998        __struct.strobe_period = buf.get_f32_le();
17999        __struct.strobe_duty_cycle = buf.get_f32_le();
18000        __struct.temp_c = buf.get_f32_le();
18001        __struct.min_strobe_period = buf.get_f32_le();
18002        __struct.max_strobe_period = buf.get_f32_le();
18003        __struct.enable = buf.get_u8();
18004        let tmp = buf.get_u8();
18005        __struct.mode_bitmask =
18006            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18007                enum_type: "IlluminatorMode",
18008                value: tmp as u32,
18009            })?;
18010        let tmp = buf.get_u8();
18011        __struct.mode =
18012            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18013                enum_type: "IlluminatorMode",
18014                value: tmp as u32,
18015            })?;
18016        Ok(__struct)
18017    }
18018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18019        let mut __tmp = BytesMut::new(bytes);
18020        #[allow(clippy::absurd_extreme_comparisons)]
18021        #[allow(unused_comparisons)]
18022        if __tmp.remaining() < Self::ENCODED_LEN {
18023            panic!(
18024                "buffer is too small (need {} bytes, but got {})",
18025                Self::ENCODED_LEN,
18026                __tmp.remaining(),
18027            )
18028        }
18029        __tmp.put_u32_le(self.uptime_ms);
18030        __tmp.put_u32_le(self.error_status.bits());
18031        __tmp.put_f32_le(self.brightness);
18032        __tmp.put_f32_le(self.strobe_period);
18033        __tmp.put_f32_le(self.strobe_duty_cycle);
18034        __tmp.put_f32_le(self.temp_c);
18035        __tmp.put_f32_le(self.min_strobe_period);
18036        __tmp.put_f32_le(self.max_strobe_period);
18037        __tmp.put_u8(self.enable);
18038        __tmp.put_u8(self.mode_bitmask as u8);
18039        __tmp.put_u8(self.mode as u8);
18040        if matches!(version, MavlinkVersion::V2) {
18041            let len = __tmp.len();
18042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18043        } else {
18044            __tmp.len()
18045        }
18046    }
18047}
18048#[doc = "Status of the Iridium SBD link."]
18049#[doc = ""]
18050#[doc = "ID: 335"]
18051#[derive(Debug, Clone, PartialEq)]
18052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18054#[cfg_attr(feature = "ts", derive(TS))]
18055#[cfg_attr(feature = "ts", ts(export))]
18056pub struct ISBD_LINK_STATUS_DATA {
18057    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18058    pub timestamp: u64,
18059    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18060    pub last_heartbeat: u64,
18061    #[doc = "Number of failed SBD sessions."]
18062    pub failed_sessions: u16,
18063    #[doc = "Number of successful SBD sessions."]
18064    pub successful_sessions: u16,
18065    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
18066    pub signal_quality: u8,
18067    #[doc = "1: Ring call pending, 0: No call pending."]
18068    pub ring_pending: u8,
18069    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
18070    pub tx_session_pending: u8,
18071    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
18072    pub rx_session_pending: u8,
18073}
18074impl ISBD_LINK_STATUS_DATA {
18075    pub const ENCODED_LEN: usize = 24usize;
18076    pub const DEFAULT: Self = Self {
18077        timestamp: 0_u64,
18078        last_heartbeat: 0_u64,
18079        failed_sessions: 0_u16,
18080        successful_sessions: 0_u16,
18081        signal_quality: 0_u8,
18082        ring_pending: 0_u8,
18083        tx_session_pending: 0_u8,
18084        rx_session_pending: 0_u8,
18085    };
18086    #[cfg(feature = "arbitrary")]
18087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18088        use arbitrary::{Arbitrary, Unstructured};
18089        let mut buf = [0u8; 1024];
18090        rng.fill_bytes(&mut buf);
18091        let mut unstructured = Unstructured::new(&buf);
18092        Self::arbitrary(&mut unstructured).unwrap_or_default()
18093    }
18094}
18095impl Default for ISBD_LINK_STATUS_DATA {
18096    fn default() -> Self {
18097        Self::DEFAULT.clone()
18098    }
18099}
18100impl MessageData for ISBD_LINK_STATUS_DATA {
18101    type Message = MavMessage;
18102    const ID: u32 = 335u32;
18103    const NAME: &'static str = "ISBD_LINK_STATUS";
18104    const EXTRA_CRC: u8 = 225u8;
18105    const ENCODED_LEN: usize = 24usize;
18106    fn deser(
18107        _version: MavlinkVersion,
18108        __input: &[u8],
18109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18110        let avail_len = __input.len();
18111        let mut payload_buf = [0; Self::ENCODED_LEN];
18112        let mut buf = if avail_len < Self::ENCODED_LEN {
18113            payload_buf[0..avail_len].copy_from_slice(__input);
18114            Bytes::new(&payload_buf)
18115        } else {
18116            Bytes::new(__input)
18117        };
18118        let mut __struct = Self::default();
18119        __struct.timestamp = buf.get_u64_le();
18120        __struct.last_heartbeat = buf.get_u64_le();
18121        __struct.failed_sessions = buf.get_u16_le();
18122        __struct.successful_sessions = buf.get_u16_le();
18123        __struct.signal_quality = buf.get_u8();
18124        __struct.ring_pending = buf.get_u8();
18125        __struct.tx_session_pending = buf.get_u8();
18126        __struct.rx_session_pending = buf.get_u8();
18127        Ok(__struct)
18128    }
18129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18130        let mut __tmp = BytesMut::new(bytes);
18131        #[allow(clippy::absurd_extreme_comparisons)]
18132        #[allow(unused_comparisons)]
18133        if __tmp.remaining() < Self::ENCODED_LEN {
18134            panic!(
18135                "buffer is too small (need {} bytes, but got {})",
18136                Self::ENCODED_LEN,
18137                __tmp.remaining(),
18138            )
18139        }
18140        __tmp.put_u64_le(self.timestamp);
18141        __tmp.put_u64_le(self.last_heartbeat);
18142        __tmp.put_u16_le(self.failed_sessions);
18143        __tmp.put_u16_le(self.successful_sessions);
18144        __tmp.put_u8(self.signal_quality);
18145        __tmp.put_u8(self.ring_pending);
18146        __tmp.put_u8(self.tx_session_pending);
18147        __tmp.put_u8(self.rx_session_pending);
18148        if matches!(version, MavlinkVersion::V2) {
18149            let len = __tmp.len();
18150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18151        } else {
18152            __tmp.len()
18153        }
18154    }
18155}
18156#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18157#[doc = ""]
18158#[doc = "ID: 149"]
18159#[derive(Debug, Clone, PartialEq)]
18160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18162#[cfg_attr(feature = "ts", derive(TS))]
18163#[cfg_attr(feature = "ts", ts(export))]
18164pub struct LANDING_TARGET_DATA {
18165    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18166    pub time_usec: u64,
18167    #[doc = "X-axis angular offset of the target from the center of the image"]
18168    pub angle_x: f32,
18169    #[doc = "Y-axis angular offset of the target from the center of the image"]
18170    pub angle_y: f32,
18171    #[doc = "Distance to the target from the vehicle"]
18172    pub distance: f32,
18173    #[doc = "Size of target along x-axis"]
18174    pub size_x: f32,
18175    #[doc = "Size of target along y-axis"]
18176    pub size_y: f32,
18177    #[doc = "The ID of the target if multiple targets are present"]
18178    pub target_num: u8,
18179    #[doc = "Coordinate frame used for following fields."]
18180    pub frame: MavFrame,
18181    #[doc = "X Position of the landing target in MAV_FRAME"]
18182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18183    pub x: f32,
18184    #[doc = "Y Position of the landing target in MAV_FRAME"]
18185    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18186    pub y: f32,
18187    #[doc = "Z Position of the landing target in MAV_FRAME"]
18188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18189    pub z: f32,
18190    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18192    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18193    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18194    pub q: [f32; 4],
18195    #[doc = "Type of landing target"]
18196    #[cfg_attr(feature = "serde", serde(default))]
18197    pub mavtype: LandingTargetType,
18198    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18199    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18200    pub position_valid: u8,
18201}
18202impl LANDING_TARGET_DATA {
18203    pub const ENCODED_LEN: usize = 60usize;
18204    pub const DEFAULT: Self = Self {
18205        time_usec: 0_u64,
18206        angle_x: 0.0_f32,
18207        angle_y: 0.0_f32,
18208        distance: 0.0_f32,
18209        size_x: 0.0_f32,
18210        size_y: 0.0_f32,
18211        target_num: 0_u8,
18212        frame: MavFrame::DEFAULT,
18213        x: 0.0_f32,
18214        y: 0.0_f32,
18215        z: 0.0_f32,
18216        q: [0.0_f32; 4usize],
18217        mavtype: LandingTargetType::DEFAULT,
18218        position_valid: 0_u8,
18219    };
18220    #[cfg(feature = "arbitrary")]
18221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18222        use arbitrary::{Arbitrary, Unstructured};
18223        let mut buf = [0u8; 1024];
18224        rng.fill_bytes(&mut buf);
18225        let mut unstructured = Unstructured::new(&buf);
18226        Self::arbitrary(&mut unstructured).unwrap_or_default()
18227    }
18228}
18229impl Default for LANDING_TARGET_DATA {
18230    fn default() -> Self {
18231        Self::DEFAULT.clone()
18232    }
18233}
18234impl MessageData for LANDING_TARGET_DATA {
18235    type Message = MavMessage;
18236    const ID: u32 = 149u32;
18237    const NAME: &'static str = "LANDING_TARGET";
18238    const EXTRA_CRC: u8 = 200u8;
18239    const ENCODED_LEN: usize = 60usize;
18240    fn deser(
18241        _version: MavlinkVersion,
18242        __input: &[u8],
18243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18244        let avail_len = __input.len();
18245        let mut payload_buf = [0; Self::ENCODED_LEN];
18246        let mut buf = if avail_len < Self::ENCODED_LEN {
18247            payload_buf[0..avail_len].copy_from_slice(__input);
18248            Bytes::new(&payload_buf)
18249        } else {
18250            Bytes::new(__input)
18251        };
18252        let mut __struct = Self::default();
18253        __struct.time_usec = buf.get_u64_le();
18254        __struct.angle_x = buf.get_f32_le();
18255        __struct.angle_y = buf.get_f32_le();
18256        __struct.distance = buf.get_f32_le();
18257        __struct.size_x = buf.get_f32_le();
18258        __struct.size_y = buf.get_f32_le();
18259        __struct.target_num = buf.get_u8();
18260        let tmp = buf.get_u8();
18261        __struct.frame =
18262            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18263                enum_type: "MavFrame",
18264                value: tmp as u32,
18265            })?;
18266        __struct.x = buf.get_f32_le();
18267        __struct.y = buf.get_f32_le();
18268        __struct.z = buf.get_f32_le();
18269        for v in &mut __struct.q {
18270            let val = buf.get_f32_le();
18271            *v = val;
18272        }
18273        let tmp = buf.get_u8();
18274        __struct.mavtype =
18275            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18276                enum_type: "LandingTargetType",
18277                value: tmp as u32,
18278            })?;
18279        __struct.position_valid = buf.get_u8();
18280        Ok(__struct)
18281    }
18282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18283        let mut __tmp = BytesMut::new(bytes);
18284        #[allow(clippy::absurd_extreme_comparisons)]
18285        #[allow(unused_comparisons)]
18286        if __tmp.remaining() < Self::ENCODED_LEN {
18287            panic!(
18288                "buffer is too small (need {} bytes, but got {})",
18289                Self::ENCODED_LEN,
18290                __tmp.remaining(),
18291            )
18292        }
18293        __tmp.put_u64_le(self.time_usec);
18294        __tmp.put_f32_le(self.angle_x);
18295        __tmp.put_f32_le(self.angle_y);
18296        __tmp.put_f32_le(self.distance);
18297        __tmp.put_f32_le(self.size_x);
18298        __tmp.put_f32_le(self.size_y);
18299        __tmp.put_u8(self.target_num);
18300        __tmp.put_u8(self.frame as u8);
18301        if matches!(version, MavlinkVersion::V2) {
18302            __tmp.put_f32_le(self.x);
18303            __tmp.put_f32_le(self.y);
18304            __tmp.put_f32_le(self.z);
18305            for val in &self.q {
18306                __tmp.put_f32_le(*val);
18307            }
18308            __tmp.put_u8(self.mavtype as u8);
18309            __tmp.put_u8(self.position_valid);
18310            let len = __tmp.len();
18311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18312        } else {
18313            __tmp.len()
18314        }
18315    }
18316}
18317#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18318#[doc = ""]
18319#[doc = "ID: 8"]
18320#[derive(Debug, Clone, PartialEq)]
18321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18323#[cfg_attr(feature = "ts", derive(TS))]
18324#[cfg_attr(feature = "ts", ts(export))]
18325pub struct LINK_NODE_STATUS_DATA {
18326    #[doc = "Timestamp (time since system boot)."]
18327    pub timestamp: u64,
18328    #[doc = "Transmit rate"]
18329    pub tx_rate: u32,
18330    #[doc = "Receive rate"]
18331    pub rx_rate: u32,
18332    #[doc = "Messages sent"]
18333    pub messages_sent: u32,
18334    #[doc = "Messages received (estimated from counting seq)"]
18335    pub messages_received: u32,
18336    #[doc = "Messages lost (estimated from counting seq)"]
18337    pub messages_lost: u32,
18338    #[doc = "Number of bytes that could not be parsed correctly."]
18339    pub rx_parse_err: u16,
18340    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18341    pub tx_overflows: u16,
18342    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18343    pub rx_overflows: u16,
18344    #[doc = "Remaining free transmit buffer space"]
18345    pub tx_buf: u8,
18346    #[doc = "Remaining free receive buffer space"]
18347    pub rx_buf: u8,
18348}
18349impl LINK_NODE_STATUS_DATA {
18350    pub const ENCODED_LEN: usize = 36usize;
18351    pub const DEFAULT: Self = Self {
18352        timestamp: 0_u64,
18353        tx_rate: 0_u32,
18354        rx_rate: 0_u32,
18355        messages_sent: 0_u32,
18356        messages_received: 0_u32,
18357        messages_lost: 0_u32,
18358        rx_parse_err: 0_u16,
18359        tx_overflows: 0_u16,
18360        rx_overflows: 0_u16,
18361        tx_buf: 0_u8,
18362        rx_buf: 0_u8,
18363    };
18364    #[cfg(feature = "arbitrary")]
18365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18366        use arbitrary::{Arbitrary, Unstructured};
18367        let mut buf = [0u8; 1024];
18368        rng.fill_bytes(&mut buf);
18369        let mut unstructured = Unstructured::new(&buf);
18370        Self::arbitrary(&mut unstructured).unwrap_or_default()
18371    }
18372}
18373impl Default for LINK_NODE_STATUS_DATA {
18374    fn default() -> Self {
18375        Self::DEFAULT.clone()
18376    }
18377}
18378impl MessageData for LINK_NODE_STATUS_DATA {
18379    type Message = MavMessage;
18380    const ID: u32 = 8u32;
18381    const NAME: &'static str = "LINK_NODE_STATUS";
18382    const EXTRA_CRC: u8 = 117u8;
18383    const ENCODED_LEN: usize = 36usize;
18384    fn deser(
18385        _version: MavlinkVersion,
18386        __input: &[u8],
18387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18388        let avail_len = __input.len();
18389        let mut payload_buf = [0; Self::ENCODED_LEN];
18390        let mut buf = if avail_len < Self::ENCODED_LEN {
18391            payload_buf[0..avail_len].copy_from_slice(__input);
18392            Bytes::new(&payload_buf)
18393        } else {
18394            Bytes::new(__input)
18395        };
18396        let mut __struct = Self::default();
18397        __struct.timestamp = buf.get_u64_le();
18398        __struct.tx_rate = buf.get_u32_le();
18399        __struct.rx_rate = buf.get_u32_le();
18400        __struct.messages_sent = buf.get_u32_le();
18401        __struct.messages_received = buf.get_u32_le();
18402        __struct.messages_lost = buf.get_u32_le();
18403        __struct.rx_parse_err = buf.get_u16_le();
18404        __struct.tx_overflows = buf.get_u16_le();
18405        __struct.rx_overflows = buf.get_u16_le();
18406        __struct.tx_buf = buf.get_u8();
18407        __struct.rx_buf = buf.get_u8();
18408        Ok(__struct)
18409    }
18410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18411        let mut __tmp = BytesMut::new(bytes);
18412        #[allow(clippy::absurd_extreme_comparisons)]
18413        #[allow(unused_comparisons)]
18414        if __tmp.remaining() < Self::ENCODED_LEN {
18415            panic!(
18416                "buffer is too small (need {} bytes, but got {})",
18417                Self::ENCODED_LEN,
18418                __tmp.remaining(),
18419            )
18420        }
18421        __tmp.put_u64_le(self.timestamp);
18422        __tmp.put_u32_le(self.tx_rate);
18423        __tmp.put_u32_le(self.rx_rate);
18424        __tmp.put_u32_le(self.messages_sent);
18425        __tmp.put_u32_le(self.messages_received);
18426        __tmp.put_u32_le(self.messages_lost);
18427        __tmp.put_u16_le(self.rx_parse_err);
18428        __tmp.put_u16_le(self.tx_overflows);
18429        __tmp.put_u16_le(self.rx_overflows);
18430        __tmp.put_u8(self.tx_buf);
18431        __tmp.put_u8(self.rx_buf);
18432        if matches!(version, MavlinkVersion::V2) {
18433            let len = __tmp.len();
18434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18435        } else {
18436            __tmp.len()
18437        }
18438    }
18439}
18440#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18441#[doc = ""]
18442#[doc = "ID: 32"]
18443#[derive(Debug, Clone, PartialEq)]
18444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18446#[cfg_attr(feature = "ts", derive(TS))]
18447#[cfg_attr(feature = "ts", ts(export))]
18448pub struct LOCAL_POSITION_NED_DATA {
18449    #[doc = "Timestamp (time since system boot)."]
18450    pub time_boot_ms: u32,
18451    #[doc = "X Position"]
18452    pub x: f32,
18453    #[doc = "Y Position"]
18454    pub y: f32,
18455    #[doc = "Z Position"]
18456    pub z: f32,
18457    #[doc = "X Speed"]
18458    pub vx: f32,
18459    #[doc = "Y Speed"]
18460    pub vy: f32,
18461    #[doc = "Z Speed"]
18462    pub vz: f32,
18463}
18464impl LOCAL_POSITION_NED_DATA {
18465    pub const ENCODED_LEN: usize = 28usize;
18466    pub const DEFAULT: Self = Self {
18467        time_boot_ms: 0_u32,
18468        x: 0.0_f32,
18469        y: 0.0_f32,
18470        z: 0.0_f32,
18471        vx: 0.0_f32,
18472        vy: 0.0_f32,
18473        vz: 0.0_f32,
18474    };
18475    #[cfg(feature = "arbitrary")]
18476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18477        use arbitrary::{Arbitrary, Unstructured};
18478        let mut buf = [0u8; 1024];
18479        rng.fill_bytes(&mut buf);
18480        let mut unstructured = Unstructured::new(&buf);
18481        Self::arbitrary(&mut unstructured).unwrap_or_default()
18482    }
18483}
18484impl Default for LOCAL_POSITION_NED_DATA {
18485    fn default() -> Self {
18486        Self::DEFAULT.clone()
18487    }
18488}
18489impl MessageData for LOCAL_POSITION_NED_DATA {
18490    type Message = MavMessage;
18491    const ID: u32 = 32u32;
18492    const NAME: &'static str = "LOCAL_POSITION_NED";
18493    const EXTRA_CRC: u8 = 185u8;
18494    const ENCODED_LEN: usize = 28usize;
18495    fn deser(
18496        _version: MavlinkVersion,
18497        __input: &[u8],
18498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18499        let avail_len = __input.len();
18500        let mut payload_buf = [0; Self::ENCODED_LEN];
18501        let mut buf = if avail_len < Self::ENCODED_LEN {
18502            payload_buf[0..avail_len].copy_from_slice(__input);
18503            Bytes::new(&payload_buf)
18504        } else {
18505            Bytes::new(__input)
18506        };
18507        let mut __struct = Self::default();
18508        __struct.time_boot_ms = buf.get_u32_le();
18509        __struct.x = buf.get_f32_le();
18510        __struct.y = buf.get_f32_le();
18511        __struct.z = buf.get_f32_le();
18512        __struct.vx = buf.get_f32_le();
18513        __struct.vy = buf.get_f32_le();
18514        __struct.vz = buf.get_f32_le();
18515        Ok(__struct)
18516    }
18517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18518        let mut __tmp = BytesMut::new(bytes);
18519        #[allow(clippy::absurd_extreme_comparisons)]
18520        #[allow(unused_comparisons)]
18521        if __tmp.remaining() < Self::ENCODED_LEN {
18522            panic!(
18523                "buffer is too small (need {} bytes, but got {})",
18524                Self::ENCODED_LEN,
18525                __tmp.remaining(),
18526            )
18527        }
18528        __tmp.put_u32_le(self.time_boot_ms);
18529        __tmp.put_f32_le(self.x);
18530        __tmp.put_f32_le(self.y);
18531        __tmp.put_f32_le(self.z);
18532        __tmp.put_f32_le(self.vx);
18533        __tmp.put_f32_le(self.vy);
18534        __tmp.put_f32_le(self.vz);
18535        if matches!(version, MavlinkVersion::V2) {
18536            let len = __tmp.len();
18537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18538        } else {
18539            __tmp.len()
18540        }
18541    }
18542}
18543#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18544#[doc = ""]
18545#[doc = "ID: 64"]
18546#[derive(Debug, Clone, PartialEq)]
18547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18549#[cfg_attr(feature = "ts", derive(TS))]
18550#[cfg_attr(feature = "ts", ts(export))]
18551pub struct LOCAL_POSITION_NED_COV_DATA {
18552    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18553    pub time_usec: u64,
18554    #[doc = "X Position"]
18555    pub x: f32,
18556    #[doc = "Y Position"]
18557    pub y: f32,
18558    #[doc = "Z Position"]
18559    pub z: f32,
18560    #[doc = "X Speed"]
18561    pub vx: f32,
18562    #[doc = "Y Speed"]
18563    pub vy: f32,
18564    #[doc = "Z Speed"]
18565    pub vz: f32,
18566    #[doc = "X Acceleration"]
18567    pub ax: f32,
18568    #[doc = "Y Acceleration"]
18569    pub ay: f32,
18570    #[doc = "Z Acceleration"]
18571    pub az: f32,
18572    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18574    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18575    pub covariance: [f32; 45],
18576    #[doc = "Class id of the estimator this estimate originated from."]
18577    pub estimator_type: MavEstimatorType,
18578}
18579impl LOCAL_POSITION_NED_COV_DATA {
18580    pub const ENCODED_LEN: usize = 225usize;
18581    pub const DEFAULT: Self = Self {
18582        time_usec: 0_u64,
18583        x: 0.0_f32,
18584        y: 0.0_f32,
18585        z: 0.0_f32,
18586        vx: 0.0_f32,
18587        vy: 0.0_f32,
18588        vz: 0.0_f32,
18589        ax: 0.0_f32,
18590        ay: 0.0_f32,
18591        az: 0.0_f32,
18592        covariance: [0.0_f32; 45usize],
18593        estimator_type: MavEstimatorType::DEFAULT,
18594    };
18595    #[cfg(feature = "arbitrary")]
18596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18597        use arbitrary::{Arbitrary, Unstructured};
18598        let mut buf = [0u8; 1024];
18599        rng.fill_bytes(&mut buf);
18600        let mut unstructured = Unstructured::new(&buf);
18601        Self::arbitrary(&mut unstructured).unwrap_or_default()
18602    }
18603}
18604impl Default for LOCAL_POSITION_NED_COV_DATA {
18605    fn default() -> Self {
18606        Self::DEFAULT.clone()
18607    }
18608}
18609impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18610    type Message = MavMessage;
18611    const ID: u32 = 64u32;
18612    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18613    const EXTRA_CRC: u8 = 191u8;
18614    const ENCODED_LEN: usize = 225usize;
18615    fn deser(
18616        _version: MavlinkVersion,
18617        __input: &[u8],
18618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18619        let avail_len = __input.len();
18620        let mut payload_buf = [0; Self::ENCODED_LEN];
18621        let mut buf = if avail_len < Self::ENCODED_LEN {
18622            payload_buf[0..avail_len].copy_from_slice(__input);
18623            Bytes::new(&payload_buf)
18624        } else {
18625            Bytes::new(__input)
18626        };
18627        let mut __struct = Self::default();
18628        __struct.time_usec = buf.get_u64_le();
18629        __struct.x = buf.get_f32_le();
18630        __struct.y = buf.get_f32_le();
18631        __struct.z = buf.get_f32_le();
18632        __struct.vx = buf.get_f32_le();
18633        __struct.vy = buf.get_f32_le();
18634        __struct.vz = buf.get_f32_le();
18635        __struct.ax = buf.get_f32_le();
18636        __struct.ay = buf.get_f32_le();
18637        __struct.az = buf.get_f32_le();
18638        for v in &mut __struct.covariance {
18639            let val = buf.get_f32_le();
18640            *v = val;
18641        }
18642        let tmp = buf.get_u8();
18643        __struct.estimator_type =
18644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18645                enum_type: "MavEstimatorType",
18646                value: tmp as u32,
18647            })?;
18648        Ok(__struct)
18649    }
18650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18651        let mut __tmp = BytesMut::new(bytes);
18652        #[allow(clippy::absurd_extreme_comparisons)]
18653        #[allow(unused_comparisons)]
18654        if __tmp.remaining() < Self::ENCODED_LEN {
18655            panic!(
18656                "buffer is too small (need {} bytes, but got {})",
18657                Self::ENCODED_LEN,
18658                __tmp.remaining(),
18659            )
18660        }
18661        __tmp.put_u64_le(self.time_usec);
18662        __tmp.put_f32_le(self.x);
18663        __tmp.put_f32_le(self.y);
18664        __tmp.put_f32_le(self.z);
18665        __tmp.put_f32_le(self.vx);
18666        __tmp.put_f32_le(self.vy);
18667        __tmp.put_f32_le(self.vz);
18668        __tmp.put_f32_le(self.ax);
18669        __tmp.put_f32_le(self.ay);
18670        __tmp.put_f32_le(self.az);
18671        for val in &self.covariance {
18672            __tmp.put_f32_le(*val);
18673        }
18674        __tmp.put_u8(self.estimator_type as u8);
18675        if matches!(version, MavlinkVersion::V2) {
18676            let len = __tmp.len();
18677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18678        } else {
18679            __tmp.len()
18680        }
18681    }
18682}
18683#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18684#[doc = ""]
18685#[doc = "ID: 89"]
18686#[derive(Debug, Clone, PartialEq)]
18687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18689#[cfg_attr(feature = "ts", derive(TS))]
18690#[cfg_attr(feature = "ts", ts(export))]
18691pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18692    #[doc = "Timestamp (time since system boot)."]
18693    pub time_boot_ms: u32,
18694    #[doc = "X Position"]
18695    pub x: f32,
18696    #[doc = "Y Position"]
18697    pub y: f32,
18698    #[doc = "Z Position"]
18699    pub z: f32,
18700    #[doc = "Roll"]
18701    pub roll: f32,
18702    #[doc = "Pitch"]
18703    pub pitch: f32,
18704    #[doc = "Yaw"]
18705    pub yaw: f32,
18706}
18707impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18708    pub const ENCODED_LEN: usize = 28usize;
18709    pub const DEFAULT: Self = Self {
18710        time_boot_ms: 0_u32,
18711        x: 0.0_f32,
18712        y: 0.0_f32,
18713        z: 0.0_f32,
18714        roll: 0.0_f32,
18715        pitch: 0.0_f32,
18716        yaw: 0.0_f32,
18717    };
18718    #[cfg(feature = "arbitrary")]
18719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18720        use arbitrary::{Arbitrary, Unstructured};
18721        let mut buf = [0u8; 1024];
18722        rng.fill_bytes(&mut buf);
18723        let mut unstructured = Unstructured::new(&buf);
18724        Self::arbitrary(&mut unstructured).unwrap_or_default()
18725    }
18726}
18727impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18728    fn default() -> Self {
18729        Self::DEFAULT.clone()
18730    }
18731}
18732impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18733    type Message = MavMessage;
18734    const ID: u32 = 89u32;
18735    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18736    const EXTRA_CRC: u8 = 231u8;
18737    const ENCODED_LEN: usize = 28usize;
18738    fn deser(
18739        _version: MavlinkVersion,
18740        __input: &[u8],
18741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18742        let avail_len = __input.len();
18743        let mut payload_buf = [0; Self::ENCODED_LEN];
18744        let mut buf = if avail_len < Self::ENCODED_LEN {
18745            payload_buf[0..avail_len].copy_from_slice(__input);
18746            Bytes::new(&payload_buf)
18747        } else {
18748            Bytes::new(__input)
18749        };
18750        let mut __struct = Self::default();
18751        __struct.time_boot_ms = buf.get_u32_le();
18752        __struct.x = buf.get_f32_le();
18753        __struct.y = buf.get_f32_le();
18754        __struct.z = buf.get_f32_le();
18755        __struct.roll = buf.get_f32_le();
18756        __struct.pitch = buf.get_f32_le();
18757        __struct.yaw = buf.get_f32_le();
18758        Ok(__struct)
18759    }
18760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18761        let mut __tmp = BytesMut::new(bytes);
18762        #[allow(clippy::absurd_extreme_comparisons)]
18763        #[allow(unused_comparisons)]
18764        if __tmp.remaining() < Self::ENCODED_LEN {
18765            panic!(
18766                "buffer is too small (need {} bytes, but got {})",
18767                Self::ENCODED_LEN,
18768                __tmp.remaining(),
18769            )
18770        }
18771        __tmp.put_u32_le(self.time_boot_ms);
18772        __tmp.put_f32_le(self.x);
18773        __tmp.put_f32_le(self.y);
18774        __tmp.put_f32_le(self.z);
18775        __tmp.put_f32_le(self.roll);
18776        __tmp.put_f32_le(self.pitch);
18777        __tmp.put_f32_le(self.yaw);
18778        if matches!(version, MavlinkVersion::V2) {
18779            let len = __tmp.len();
18780            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18781        } else {
18782            __tmp.len()
18783        }
18784    }
18785}
18786#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18787#[doc = ""]
18788#[doc = "ID: 268"]
18789#[derive(Debug, Clone, PartialEq)]
18790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18792#[cfg_attr(feature = "ts", derive(TS))]
18793#[cfg_attr(feature = "ts", ts(export))]
18794pub struct LOGGING_ACK_DATA {
18795    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18796    pub sequence: u16,
18797    #[doc = "system ID of the target"]
18798    pub target_system: u8,
18799    #[doc = "component ID of the target"]
18800    pub target_component: u8,
18801}
18802impl LOGGING_ACK_DATA {
18803    pub const ENCODED_LEN: usize = 4usize;
18804    pub const DEFAULT: Self = Self {
18805        sequence: 0_u16,
18806        target_system: 0_u8,
18807        target_component: 0_u8,
18808    };
18809    #[cfg(feature = "arbitrary")]
18810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18811        use arbitrary::{Arbitrary, Unstructured};
18812        let mut buf = [0u8; 1024];
18813        rng.fill_bytes(&mut buf);
18814        let mut unstructured = Unstructured::new(&buf);
18815        Self::arbitrary(&mut unstructured).unwrap_or_default()
18816    }
18817}
18818impl Default for LOGGING_ACK_DATA {
18819    fn default() -> Self {
18820        Self::DEFAULT.clone()
18821    }
18822}
18823impl MessageData for LOGGING_ACK_DATA {
18824    type Message = MavMessage;
18825    const ID: u32 = 268u32;
18826    const NAME: &'static str = "LOGGING_ACK";
18827    const EXTRA_CRC: u8 = 14u8;
18828    const ENCODED_LEN: usize = 4usize;
18829    fn deser(
18830        _version: MavlinkVersion,
18831        __input: &[u8],
18832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18833        let avail_len = __input.len();
18834        let mut payload_buf = [0; Self::ENCODED_LEN];
18835        let mut buf = if avail_len < Self::ENCODED_LEN {
18836            payload_buf[0..avail_len].copy_from_slice(__input);
18837            Bytes::new(&payload_buf)
18838        } else {
18839            Bytes::new(__input)
18840        };
18841        let mut __struct = Self::default();
18842        __struct.sequence = buf.get_u16_le();
18843        __struct.target_system = buf.get_u8();
18844        __struct.target_component = buf.get_u8();
18845        Ok(__struct)
18846    }
18847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18848        let mut __tmp = BytesMut::new(bytes);
18849        #[allow(clippy::absurd_extreme_comparisons)]
18850        #[allow(unused_comparisons)]
18851        if __tmp.remaining() < Self::ENCODED_LEN {
18852            panic!(
18853                "buffer is too small (need {} bytes, but got {})",
18854                Self::ENCODED_LEN,
18855                __tmp.remaining(),
18856            )
18857        }
18858        __tmp.put_u16_le(self.sequence);
18859        __tmp.put_u8(self.target_system);
18860        __tmp.put_u8(self.target_component);
18861        if matches!(version, MavlinkVersion::V2) {
18862            let len = __tmp.len();
18863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18864        } else {
18865            __tmp.len()
18866        }
18867    }
18868}
18869#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18870#[doc = ""]
18871#[doc = "ID: 266"]
18872#[derive(Debug, Clone, PartialEq)]
18873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18875#[cfg_attr(feature = "ts", derive(TS))]
18876#[cfg_attr(feature = "ts", ts(export))]
18877pub struct LOGGING_DATA_DATA {
18878    #[doc = "sequence number (can wrap)"]
18879    pub sequence: u16,
18880    #[doc = "system ID of the target"]
18881    pub target_system: u8,
18882    #[doc = "component ID of the target"]
18883    pub target_component: u8,
18884    #[doc = "data length"]
18885    pub length: u8,
18886    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18887    pub first_message_offset: u8,
18888    #[doc = "logged data"]
18889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18890    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18891    pub data: [u8; 249],
18892}
18893impl LOGGING_DATA_DATA {
18894    pub const ENCODED_LEN: usize = 255usize;
18895    pub const DEFAULT: Self = Self {
18896        sequence: 0_u16,
18897        target_system: 0_u8,
18898        target_component: 0_u8,
18899        length: 0_u8,
18900        first_message_offset: 0_u8,
18901        data: [0_u8; 249usize],
18902    };
18903    #[cfg(feature = "arbitrary")]
18904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18905        use arbitrary::{Arbitrary, Unstructured};
18906        let mut buf = [0u8; 1024];
18907        rng.fill_bytes(&mut buf);
18908        let mut unstructured = Unstructured::new(&buf);
18909        Self::arbitrary(&mut unstructured).unwrap_or_default()
18910    }
18911}
18912impl Default for LOGGING_DATA_DATA {
18913    fn default() -> Self {
18914        Self::DEFAULT.clone()
18915    }
18916}
18917impl MessageData for LOGGING_DATA_DATA {
18918    type Message = MavMessage;
18919    const ID: u32 = 266u32;
18920    const NAME: &'static str = "LOGGING_DATA";
18921    const EXTRA_CRC: u8 = 193u8;
18922    const ENCODED_LEN: usize = 255usize;
18923    fn deser(
18924        _version: MavlinkVersion,
18925        __input: &[u8],
18926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18927        let avail_len = __input.len();
18928        let mut payload_buf = [0; Self::ENCODED_LEN];
18929        let mut buf = if avail_len < Self::ENCODED_LEN {
18930            payload_buf[0..avail_len].copy_from_slice(__input);
18931            Bytes::new(&payload_buf)
18932        } else {
18933            Bytes::new(__input)
18934        };
18935        let mut __struct = Self::default();
18936        __struct.sequence = buf.get_u16_le();
18937        __struct.target_system = buf.get_u8();
18938        __struct.target_component = buf.get_u8();
18939        __struct.length = buf.get_u8();
18940        __struct.first_message_offset = buf.get_u8();
18941        for v in &mut __struct.data {
18942            let val = buf.get_u8();
18943            *v = val;
18944        }
18945        Ok(__struct)
18946    }
18947    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18948        let mut __tmp = BytesMut::new(bytes);
18949        #[allow(clippy::absurd_extreme_comparisons)]
18950        #[allow(unused_comparisons)]
18951        if __tmp.remaining() < Self::ENCODED_LEN {
18952            panic!(
18953                "buffer is too small (need {} bytes, but got {})",
18954                Self::ENCODED_LEN,
18955                __tmp.remaining(),
18956            )
18957        }
18958        __tmp.put_u16_le(self.sequence);
18959        __tmp.put_u8(self.target_system);
18960        __tmp.put_u8(self.target_component);
18961        __tmp.put_u8(self.length);
18962        __tmp.put_u8(self.first_message_offset);
18963        for val in &self.data {
18964            __tmp.put_u8(*val);
18965        }
18966        if matches!(version, MavlinkVersion::V2) {
18967            let len = __tmp.len();
18968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18969        } else {
18970            __tmp.len()
18971        }
18972    }
18973}
18974#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18975#[doc = ""]
18976#[doc = "ID: 267"]
18977#[derive(Debug, Clone, PartialEq)]
18978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18980#[cfg_attr(feature = "ts", derive(TS))]
18981#[cfg_attr(feature = "ts", ts(export))]
18982pub struct LOGGING_DATA_ACKED_DATA {
18983    #[doc = "sequence number (can wrap)"]
18984    pub sequence: u16,
18985    #[doc = "system ID of the target"]
18986    pub target_system: u8,
18987    #[doc = "component ID of the target"]
18988    pub target_component: u8,
18989    #[doc = "data length"]
18990    pub length: u8,
18991    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18992    pub first_message_offset: u8,
18993    #[doc = "logged data"]
18994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18996    pub data: [u8; 249],
18997}
18998impl LOGGING_DATA_ACKED_DATA {
18999    pub const ENCODED_LEN: usize = 255usize;
19000    pub const DEFAULT: Self = Self {
19001        sequence: 0_u16,
19002        target_system: 0_u8,
19003        target_component: 0_u8,
19004        length: 0_u8,
19005        first_message_offset: 0_u8,
19006        data: [0_u8; 249usize],
19007    };
19008    #[cfg(feature = "arbitrary")]
19009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19010        use arbitrary::{Arbitrary, Unstructured};
19011        let mut buf = [0u8; 1024];
19012        rng.fill_bytes(&mut buf);
19013        let mut unstructured = Unstructured::new(&buf);
19014        Self::arbitrary(&mut unstructured).unwrap_or_default()
19015    }
19016}
19017impl Default for LOGGING_DATA_ACKED_DATA {
19018    fn default() -> Self {
19019        Self::DEFAULT.clone()
19020    }
19021}
19022impl MessageData for LOGGING_DATA_ACKED_DATA {
19023    type Message = MavMessage;
19024    const ID: u32 = 267u32;
19025    const NAME: &'static str = "LOGGING_DATA_ACKED";
19026    const EXTRA_CRC: u8 = 35u8;
19027    const ENCODED_LEN: usize = 255usize;
19028    fn deser(
19029        _version: MavlinkVersion,
19030        __input: &[u8],
19031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19032        let avail_len = __input.len();
19033        let mut payload_buf = [0; Self::ENCODED_LEN];
19034        let mut buf = if avail_len < Self::ENCODED_LEN {
19035            payload_buf[0..avail_len].copy_from_slice(__input);
19036            Bytes::new(&payload_buf)
19037        } else {
19038            Bytes::new(__input)
19039        };
19040        let mut __struct = Self::default();
19041        __struct.sequence = buf.get_u16_le();
19042        __struct.target_system = buf.get_u8();
19043        __struct.target_component = buf.get_u8();
19044        __struct.length = buf.get_u8();
19045        __struct.first_message_offset = buf.get_u8();
19046        for v in &mut __struct.data {
19047            let val = buf.get_u8();
19048            *v = val;
19049        }
19050        Ok(__struct)
19051    }
19052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19053        let mut __tmp = BytesMut::new(bytes);
19054        #[allow(clippy::absurd_extreme_comparisons)]
19055        #[allow(unused_comparisons)]
19056        if __tmp.remaining() < Self::ENCODED_LEN {
19057            panic!(
19058                "buffer is too small (need {} bytes, but got {})",
19059                Self::ENCODED_LEN,
19060                __tmp.remaining(),
19061            )
19062        }
19063        __tmp.put_u16_le(self.sequence);
19064        __tmp.put_u8(self.target_system);
19065        __tmp.put_u8(self.target_component);
19066        __tmp.put_u8(self.length);
19067        __tmp.put_u8(self.first_message_offset);
19068        for val in &self.data {
19069            __tmp.put_u8(*val);
19070        }
19071        if matches!(version, MavlinkVersion::V2) {
19072            let len = __tmp.len();
19073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19074        } else {
19075            __tmp.len()
19076        }
19077    }
19078}
19079#[doc = "Reply to LOG_REQUEST_DATA."]
19080#[doc = ""]
19081#[doc = "ID: 120"]
19082#[derive(Debug, Clone, PartialEq)]
19083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19085#[cfg_attr(feature = "ts", derive(TS))]
19086#[cfg_attr(feature = "ts", ts(export))]
19087pub struct LOG_DATA_DATA {
19088    #[doc = "Offset into the log"]
19089    pub ofs: u32,
19090    #[doc = "Log id (from LOG_ENTRY reply)"]
19091    pub id: u16,
19092    #[doc = "Number of bytes (zero for end of log)"]
19093    pub count: u8,
19094    #[doc = "log data"]
19095    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19096    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19097    pub data: [u8; 90],
19098}
19099impl LOG_DATA_DATA {
19100    pub const ENCODED_LEN: usize = 97usize;
19101    pub const DEFAULT: Self = Self {
19102        ofs: 0_u32,
19103        id: 0_u16,
19104        count: 0_u8,
19105        data: [0_u8; 90usize],
19106    };
19107    #[cfg(feature = "arbitrary")]
19108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19109        use arbitrary::{Arbitrary, Unstructured};
19110        let mut buf = [0u8; 1024];
19111        rng.fill_bytes(&mut buf);
19112        let mut unstructured = Unstructured::new(&buf);
19113        Self::arbitrary(&mut unstructured).unwrap_or_default()
19114    }
19115}
19116impl Default for LOG_DATA_DATA {
19117    fn default() -> Self {
19118        Self::DEFAULT.clone()
19119    }
19120}
19121impl MessageData for LOG_DATA_DATA {
19122    type Message = MavMessage;
19123    const ID: u32 = 120u32;
19124    const NAME: &'static str = "LOG_DATA";
19125    const EXTRA_CRC: u8 = 134u8;
19126    const ENCODED_LEN: usize = 97usize;
19127    fn deser(
19128        _version: MavlinkVersion,
19129        __input: &[u8],
19130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19131        let avail_len = __input.len();
19132        let mut payload_buf = [0; Self::ENCODED_LEN];
19133        let mut buf = if avail_len < Self::ENCODED_LEN {
19134            payload_buf[0..avail_len].copy_from_slice(__input);
19135            Bytes::new(&payload_buf)
19136        } else {
19137            Bytes::new(__input)
19138        };
19139        let mut __struct = Self::default();
19140        __struct.ofs = buf.get_u32_le();
19141        __struct.id = buf.get_u16_le();
19142        __struct.count = buf.get_u8();
19143        for v in &mut __struct.data {
19144            let val = buf.get_u8();
19145            *v = val;
19146        }
19147        Ok(__struct)
19148    }
19149    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19150        let mut __tmp = BytesMut::new(bytes);
19151        #[allow(clippy::absurd_extreme_comparisons)]
19152        #[allow(unused_comparisons)]
19153        if __tmp.remaining() < Self::ENCODED_LEN {
19154            panic!(
19155                "buffer is too small (need {} bytes, but got {})",
19156                Self::ENCODED_LEN,
19157                __tmp.remaining(),
19158            )
19159        }
19160        __tmp.put_u32_le(self.ofs);
19161        __tmp.put_u16_le(self.id);
19162        __tmp.put_u8(self.count);
19163        for val in &self.data {
19164            __tmp.put_u8(*val);
19165        }
19166        if matches!(version, MavlinkVersion::V2) {
19167            let len = __tmp.len();
19168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19169        } else {
19170            __tmp.len()
19171        }
19172    }
19173}
19174#[doc = "Reply to LOG_REQUEST_LIST."]
19175#[doc = ""]
19176#[doc = "ID: 118"]
19177#[derive(Debug, Clone, PartialEq)]
19178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19180#[cfg_attr(feature = "ts", derive(TS))]
19181#[cfg_attr(feature = "ts", ts(export))]
19182pub struct LOG_ENTRY_DATA {
19183    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19184    pub time_utc: u32,
19185    #[doc = "Size of the log (may be approximate)"]
19186    pub size: u32,
19187    #[doc = "Log id"]
19188    pub id: u16,
19189    #[doc = "Total number of logs"]
19190    pub num_logs: u16,
19191    #[doc = "High log number"]
19192    pub last_log_num: u16,
19193}
19194impl LOG_ENTRY_DATA {
19195    pub const ENCODED_LEN: usize = 14usize;
19196    pub const DEFAULT: Self = Self {
19197        time_utc: 0_u32,
19198        size: 0_u32,
19199        id: 0_u16,
19200        num_logs: 0_u16,
19201        last_log_num: 0_u16,
19202    };
19203    #[cfg(feature = "arbitrary")]
19204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19205        use arbitrary::{Arbitrary, Unstructured};
19206        let mut buf = [0u8; 1024];
19207        rng.fill_bytes(&mut buf);
19208        let mut unstructured = Unstructured::new(&buf);
19209        Self::arbitrary(&mut unstructured).unwrap_or_default()
19210    }
19211}
19212impl Default for LOG_ENTRY_DATA {
19213    fn default() -> Self {
19214        Self::DEFAULT.clone()
19215    }
19216}
19217impl MessageData for LOG_ENTRY_DATA {
19218    type Message = MavMessage;
19219    const ID: u32 = 118u32;
19220    const NAME: &'static str = "LOG_ENTRY";
19221    const EXTRA_CRC: u8 = 56u8;
19222    const ENCODED_LEN: usize = 14usize;
19223    fn deser(
19224        _version: MavlinkVersion,
19225        __input: &[u8],
19226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19227        let avail_len = __input.len();
19228        let mut payload_buf = [0; Self::ENCODED_LEN];
19229        let mut buf = if avail_len < Self::ENCODED_LEN {
19230            payload_buf[0..avail_len].copy_from_slice(__input);
19231            Bytes::new(&payload_buf)
19232        } else {
19233            Bytes::new(__input)
19234        };
19235        let mut __struct = Self::default();
19236        __struct.time_utc = buf.get_u32_le();
19237        __struct.size = buf.get_u32_le();
19238        __struct.id = buf.get_u16_le();
19239        __struct.num_logs = buf.get_u16_le();
19240        __struct.last_log_num = buf.get_u16_le();
19241        Ok(__struct)
19242    }
19243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19244        let mut __tmp = BytesMut::new(bytes);
19245        #[allow(clippy::absurd_extreme_comparisons)]
19246        #[allow(unused_comparisons)]
19247        if __tmp.remaining() < Self::ENCODED_LEN {
19248            panic!(
19249                "buffer is too small (need {} bytes, but got {})",
19250                Self::ENCODED_LEN,
19251                __tmp.remaining(),
19252            )
19253        }
19254        __tmp.put_u32_le(self.time_utc);
19255        __tmp.put_u32_le(self.size);
19256        __tmp.put_u16_le(self.id);
19257        __tmp.put_u16_le(self.num_logs);
19258        __tmp.put_u16_le(self.last_log_num);
19259        if matches!(version, MavlinkVersion::V2) {
19260            let len = __tmp.len();
19261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19262        } else {
19263            __tmp.len()
19264        }
19265    }
19266}
19267#[doc = "Erase all logs."]
19268#[doc = ""]
19269#[doc = "ID: 121"]
19270#[derive(Debug, Clone, PartialEq)]
19271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19273#[cfg_attr(feature = "ts", derive(TS))]
19274#[cfg_attr(feature = "ts", ts(export))]
19275pub struct LOG_ERASE_DATA {
19276    #[doc = "System ID"]
19277    pub target_system: u8,
19278    #[doc = "Component ID"]
19279    pub target_component: u8,
19280}
19281impl LOG_ERASE_DATA {
19282    pub const ENCODED_LEN: usize = 2usize;
19283    pub const DEFAULT: Self = Self {
19284        target_system: 0_u8,
19285        target_component: 0_u8,
19286    };
19287    #[cfg(feature = "arbitrary")]
19288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19289        use arbitrary::{Arbitrary, Unstructured};
19290        let mut buf = [0u8; 1024];
19291        rng.fill_bytes(&mut buf);
19292        let mut unstructured = Unstructured::new(&buf);
19293        Self::arbitrary(&mut unstructured).unwrap_or_default()
19294    }
19295}
19296impl Default for LOG_ERASE_DATA {
19297    fn default() -> Self {
19298        Self::DEFAULT.clone()
19299    }
19300}
19301impl MessageData for LOG_ERASE_DATA {
19302    type Message = MavMessage;
19303    const ID: u32 = 121u32;
19304    const NAME: &'static str = "LOG_ERASE";
19305    const EXTRA_CRC: u8 = 237u8;
19306    const ENCODED_LEN: usize = 2usize;
19307    fn deser(
19308        _version: MavlinkVersion,
19309        __input: &[u8],
19310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19311        let avail_len = __input.len();
19312        let mut payload_buf = [0; Self::ENCODED_LEN];
19313        let mut buf = if avail_len < Self::ENCODED_LEN {
19314            payload_buf[0..avail_len].copy_from_slice(__input);
19315            Bytes::new(&payload_buf)
19316        } else {
19317            Bytes::new(__input)
19318        };
19319        let mut __struct = Self::default();
19320        __struct.target_system = buf.get_u8();
19321        __struct.target_component = buf.get_u8();
19322        Ok(__struct)
19323    }
19324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19325        let mut __tmp = BytesMut::new(bytes);
19326        #[allow(clippy::absurd_extreme_comparisons)]
19327        #[allow(unused_comparisons)]
19328        if __tmp.remaining() < Self::ENCODED_LEN {
19329            panic!(
19330                "buffer is too small (need {} bytes, but got {})",
19331                Self::ENCODED_LEN,
19332                __tmp.remaining(),
19333            )
19334        }
19335        __tmp.put_u8(self.target_system);
19336        __tmp.put_u8(self.target_component);
19337        if matches!(version, MavlinkVersion::V2) {
19338            let len = __tmp.len();
19339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19340        } else {
19341            __tmp.len()
19342        }
19343    }
19344}
19345#[doc = "Request a chunk of a log."]
19346#[doc = ""]
19347#[doc = "ID: 119"]
19348#[derive(Debug, Clone, PartialEq)]
19349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19351#[cfg_attr(feature = "ts", derive(TS))]
19352#[cfg_attr(feature = "ts", ts(export))]
19353pub struct LOG_REQUEST_DATA_DATA {
19354    #[doc = "Offset into the log"]
19355    pub ofs: u32,
19356    #[doc = "Number of bytes"]
19357    pub count: u32,
19358    #[doc = "Log id (from LOG_ENTRY reply)"]
19359    pub id: u16,
19360    #[doc = "System ID"]
19361    pub target_system: u8,
19362    #[doc = "Component ID"]
19363    pub target_component: u8,
19364}
19365impl LOG_REQUEST_DATA_DATA {
19366    pub const ENCODED_LEN: usize = 12usize;
19367    pub const DEFAULT: Self = Self {
19368        ofs: 0_u32,
19369        count: 0_u32,
19370        id: 0_u16,
19371        target_system: 0_u8,
19372        target_component: 0_u8,
19373    };
19374    #[cfg(feature = "arbitrary")]
19375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19376        use arbitrary::{Arbitrary, Unstructured};
19377        let mut buf = [0u8; 1024];
19378        rng.fill_bytes(&mut buf);
19379        let mut unstructured = Unstructured::new(&buf);
19380        Self::arbitrary(&mut unstructured).unwrap_or_default()
19381    }
19382}
19383impl Default for LOG_REQUEST_DATA_DATA {
19384    fn default() -> Self {
19385        Self::DEFAULT.clone()
19386    }
19387}
19388impl MessageData for LOG_REQUEST_DATA_DATA {
19389    type Message = MavMessage;
19390    const ID: u32 = 119u32;
19391    const NAME: &'static str = "LOG_REQUEST_DATA";
19392    const EXTRA_CRC: u8 = 116u8;
19393    const ENCODED_LEN: usize = 12usize;
19394    fn deser(
19395        _version: MavlinkVersion,
19396        __input: &[u8],
19397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19398        let avail_len = __input.len();
19399        let mut payload_buf = [0; Self::ENCODED_LEN];
19400        let mut buf = if avail_len < Self::ENCODED_LEN {
19401            payload_buf[0..avail_len].copy_from_slice(__input);
19402            Bytes::new(&payload_buf)
19403        } else {
19404            Bytes::new(__input)
19405        };
19406        let mut __struct = Self::default();
19407        __struct.ofs = buf.get_u32_le();
19408        __struct.count = buf.get_u32_le();
19409        __struct.id = buf.get_u16_le();
19410        __struct.target_system = buf.get_u8();
19411        __struct.target_component = buf.get_u8();
19412        Ok(__struct)
19413    }
19414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19415        let mut __tmp = BytesMut::new(bytes);
19416        #[allow(clippy::absurd_extreme_comparisons)]
19417        #[allow(unused_comparisons)]
19418        if __tmp.remaining() < Self::ENCODED_LEN {
19419            panic!(
19420                "buffer is too small (need {} bytes, but got {})",
19421                Self::ENCODED_LEN,
19422                __tmp.remaining(),
19423            )
19424        }
19425        __tmp.put_u32_le(self.ofs);
19426        __tmp.put_u32_le(self.count);
19427        __tmp.put_u16_le(self.id);
19428        __tmp.put_u8(self.target_system);
19429        __tmp.put_u8(self.target_component);
19430        if matches!(version, MavlinkVersion::V2) {
19431            let len = __tmp.len();
19432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19433        } else {
19434            __tmp.len()
19435        }
19436    }
19437}
19438#[doc = "Stop log transfer and resume normal logging."]
19439#[doc = ""]
19440#[doc = "ID: 122"]
19441#[derive(Debug, Clone, PartialEq)]
19442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19444#[cfg_attr(feature = "ts", derive(TS))]
19445#[cfg_attr(feature = "ts", ts(export))]
19446pub struct LOG_REQUEST_END_DATA {
19447    #[doc = "System ID"]
19448    pub target_system: u8,
19449    #[doc = "Component ID"]
19450    pub target_component: u8,
19451}
19452impl LOG_REQUEST_END_DATA {
19453    pub const ENCODED_LEN: usize = 2usize;
19454    pub const DEFAULT: Self = Self {
19455        target_system: 0_u8,
19456        target_component: 0_u8,
19457    };
19458    #[cfg(feature = "arbitrary")]
19459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19460        use arbitrary::{Arbitrary, Unstructured};
19461        let mut buf = [0u8; 1024];
19462        rng.fill_bytes(&mut buf);
19463        let mut unstructured = Unstructured::new(&buf);
19464        Self::arbitrary(&mut unstructured).unwrap_or_default()
19465    }
19466}
19467impl Default for LOG_REQUEST_END_DATA {
19468    fn default() -> Self {
19469        Self::DEFAULT.clone()
19470    }
19471}
19472impl MessageData for LOG_REQUEST_END_DATA {
19473    type Message = MavMessage;
19474    const ID: u32 = 122u32;
19475    const NAME: &'static str = "LOG_REQUEST_END";
19476    const EXTRA_CRC: u8 = 203u8;
19477    const ENCODED_LEN: usize = 2usize;
19478    fn deser(
19479        _version: MavlinkVersion,
19480        __input: &[u8],
19481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19482        let avail_len = __input.len();
19483        let mut payload_buf = [0; Self::ENCODED_LEN];
19484        let mut buf = if avail_len < Self::ENCODED_LEN {
19485            payload_buf[0..avail_len].copy_from_slice(__input);
19486            Bytes::new(&payload_buf)
19487        } else {
19488            Bytes::new(__input)
19489        };
19490        let mut __struct = Self::default();
19491        __struct.target_system = buf.get_u8();
19492        __struct.target_component = buf.get_u8();
19493        Ok(__struct)
19494    }
19495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19496        let mut __tmp = BytesMut::new(bytes);
19497        #[allow(clippy::absurd_extreme_comparisons)]
19498        #[allow(unused_comparisons)]
19499        if __tmp.remaining() < Self::ENCODED_LEN {
19500            panic!(
19501                "buffer is too small (need {} bytes, but got {})",
19502                Self::ENCODED_LEN,
19503                __tmp.remaining(),
19504            )
19505        }
19506        __tmp.put_u8(self.target_system);
19507        __tmp.put_u8(self.target_component);
19508        if matches!(version, MavlinkVersion::V2) {
19509            let len = __tmp.len();
19510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19511        } else {
19512            __tmp.len()
19513        }
19514    }
19515}
19516#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19517#[doc = ""]
19518#[doc = "ID: 117"]
19519#[derive(Debug, Clone, PartialEq)]
19520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19522#[cfg_attr(feature = "ts", derive(TS))]
19523#[cfg_attr(feature = "ts", ts(export))]
19524pub struct LOG_REQUEST_LIST_DATA {
19525    #[doc = "First log id (0 for first available)"]
19526    pub start: u16,
19527    #[doc = "Last log id (0xffff for last available)"]
19528    pub end: u16,
19529    #[doc = "System ID"]
19530    pub target_system: u8,
19531    #[doc = "Component ID"]
19532    pub target_component: u8,
19533}
19534impl LOG_REQUEST_LIST_DATA {
19535    pub const ENCODED_LEN: usize = 6usize;
19536    pub const DEFAULT: Self = Self {
19537        start: 0_u16,
19538        end: 0_u16,
19539        target_system: 0_u8,
19540        target_component: 0_u8,
19541    };
19542    #[cfg(feature = "arbitrary")]
19543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19544        use arbitrary::{Arbitrary, Unstructured};
19545        let mut buf = [0u8; 1024];
19546        rng.fill_bytes(&mut buf);
19547        let mut unstructured = Unstructured::new(&buf);
19548        Self::arbitrary(&mut unstructured).unwrap_or_default()
19549    }
19550}
19551impl Default for LOG_REQUEST_LIST_DATA {
19552    fn default() -> Self {
19553        Self::DEFAULT.clone()
19554    }
19555}
19556impl MessageData for LOG_REQUEST_LIST_DATA {
19557    type Message = MavMessage;
19558    const ID: u32 = 117u32;
19559    const NAME: &'static str = "LOG_REQUEST_LIST";
19560    const EXTRA_CRC: u8 = 128u8;
19561    const ENCODED_LEN: usize = 6usize;
19562    fn deser(
19563        _version: MavlinkVersion,
19564        __input: &[u8],
19565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19566        let avail_len = __input.len();
19567        let mut payload_buf = [0; Self::ENCODED_LEN];
19568        let mut buf = if avail_len < Self::ENCODED_LEN {
19569            payload_buf[0..avail_len].copy_from_slice(__input);
19570            Bytes::new(&payload_buf)
19571        } else {
19572            Bytes::new(__input)
19573        };
19574        let mut __struct = Self::default();
19575        __struct.start = buf.get_u16_le();
19576        __struct.end = buf.get_u16_le();
19577        __struct.target_system = buf.get_u8();
19578        __struct.target_component = buf.get_u8();
19579        Ok(__struct)
19580    }
19581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19582        let mut __tmp = BytesMut::new(bytes);
19583        #[allow(clippy::absurd_extreme_comparisons)]
19584        #[allow(unused_comparisons)]
19585        if __tmp.remaining() < Self::ENCODED_LEN {
19586            panic!(
19587                "buffer is too small (need {} bytes, but got {})",
19588                Self::ENCODED_LEN,
19589                __tmp.remaining(),
19590            )
19591        }
19592        __tmp.put_u16_le(self.start);
19593        __tmp.put_u16_le(self.end);
19594        __tmp.put_u8(self.target_system);
19595        __tmp.put_u8(self.target_component);
19596        if matches!(version, MavlinkVersion::V2) {
19597            let len = __tmp.len();
19598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19599        } else {
19600            __tmp.len()
19601        }
19602    }
19603}
19604#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19605#[doc = ""]
19606#[doc = "ID: 192"]
19607#[derive(Debug, Clone, PartialEq)]
19608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19610#[cfg_attr(feature = "ts", derive(TS))]
19611#[cfg_attr(feature = "ts", ts(export))]
19612pub struct MAG_CAL_REPORT_DATA {
19613    #[doc = "RMS milligauss residuals."]
19614    pub fitness: f32,
19615    #[doc = "X offset."]
19616    pub ofs_x: f32,
19617    #[doc = "Y offset."]
19618    pub ofs_y: f32,
19619    #[doc = "Z offset."]
19620    pub ofs_z: f32,
19621    #[doc = "X diagonal (matrix 11)."]
19622    pub diag_x: f32,
19623    #[doc = "Y diagonal (matrix 22)."]
19624    pub diag_y: f32,
19625    #[doc = "Z diagonal (matrix 33)."]
19626    pub diag_z: f32,
19627    #[doc = "X off-diagonal (matrix 12 and 21)."]
19628    pub offdiag_x: f32,
19629    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19630    pub offdiag_y: f32,
19631    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19632    pub offdiag_z: f32,
19633    #[doc = "Compass being calibrated."]
19634    pub compass_id: u8,
19635    #[doc = "Bitmask of compasses being calibrated."]
19636    pub cal_mask: u8,
19637    #[doc = "Calibration Status."]
19638    pub cal_status: MagCalStatus,
19639    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19640    pub autosaved: u8,
19641    #[doc = "Confidence in orientation (higher is better)."]
19642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19643    pub orientation_confidence: f32,
19644    #[doc = "orientation before calibration."]
19645    #[cfg_attr(feature = "serde", serde(default))]
19646    pub old_orientation: MavSensorOrientation,
19647    #[doc = "orientation after calibration."]
19648    #[cfg_attr(feature = "serde", serde(default))]
19649    pub new_orientation: MavSensorOrientation,
19650    #[doc = "field radius correction factor"]
19651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19652    pub scale_factor: f32,
19653}
19654impl MAG_CAL_REPORT_DATA {
19655    pub const ENCODED_LEN: usize = 54usize;
19656    pub const DEFAULT: Self = Self {
19657        fitness: 0.0_f32,
19658        ofs_x: 0.0_f32,
19659        ofs_y: 0.0_f32,
19660        ofs_z: 0.0_f32,
19661        diag_x: 0.0_f32,
19662        diag_y: 0.0_f32,
19663        diag_z: 0.0_f32,
19664        offdiag_x: 0.0_f32,
19665        offdiag_y: 0.0_f32,
19666        offdiag_z: 0.0_f32,
19667        compass_id: 0_u8,
19668        cal_mask: 0_u8,
19669        cal_status: MagCalStatus::DEFAULT,
19670        autosaved: 0_u8,
19671        orientation_confidence: 0.0_f32,
19672        old_orientation: MavSensorOrientation::DEFAULT,
19673        new_orientation: MavSensorOrientation::DEFAULT,
19674        scale_factor: 0.0_f32,
19675    };
19676    #[cfg(feature = "arbitrary")]
19677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19678        use arbitrary::{Arbitrary, Unstructured};
19679        let mut buf = [0u8; 1024];
19680        rng.fill_bytes(&mut buf);
19681        let mut unstructured = Unstructured::new(&buf);
19682        Self::arbitrary(&mut unstructured).unwrap_or_default()
19683    }
19684}
19685impl Default for MAG_CAL_REPORT_DATA {
19686    fn default() -> Self {
19687        Self::DEFAULT.clone()
19688    }
19689}
19690impl MessageData for MAG_CAL_REPORT_DATA {
19691    type Message = MavMessage;
19692    const ID: u32 = 192u32;
19693    const NAME: &'static str = "MAG_CAL_REPORT";
19694    const EXTRA_CRC: u8 = 36u8;
19695    const ENCODED_LEN: usize = 54usize;
19696    fn deser(
19697        _version: MavlinkVersion,
19698        __input: &[u8],
19699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19700        let avail_len = __input.len();
19701        let mut payload_buf = [0; Self::ENCODED_LEN];
19702        let mut buf = if avail_len < Self::ENCODED_LEN {
19703            payload_buf[0..avail_len].copy_from_slice(__input);
19704            Bytes::new(&payload_buf)
19705        } else {
19706            Bytes::new(__input)
19707        };
19708        let mut __struct = Self::default();
19709        __struct.fitness = buf.get_f32_le();
19710        __struct.ofs_x = buf.get_f32_le();
19711        __struct.ofs_y = buf.get_f32_le();
19712        __struct.ofs_z = buf.get_f32_le();
19713        __struct.diag_x = buf.get_f32_le();
19714        __struct.diag_y = buf.get_f32_le();
19715        __struct.diag_z = buf.get_f32_le();
19716        __struct.offdiag_x = buf.get_f32_le();
19717        __struct.offdiag_y = buf.get_f32_le();
19718        __struct.offdiag_z = buf.get_f32_le();
19719        __struct.compass_id = buf.get_u8();
19720        __struct.cal_mask = buf.get_u8();
19721        let tmp = buf.get_u8();
19722        __struct.cal_status =
19723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19724                enum_type: "MagCalStatus",
19725                value: tmp as u32,
19726            })?;
19727        __struct.autosaved = buf.get_u8();
19728        __struct.orientation_confidence = buf.get_f32_le();
19729        let tmp = buf.get_u8();
19730        __struct.old_orientation =
19731            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19732                enum_type: "MavSensorOrientation",
19733                value: tmp as u32,
19734            })?;
19735        let tmp = buf.get_u8();
19736        __struct.new_orientation =
19737            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19738                enum_type: "MavSensorOrientation",
19739                value: tmp as u32,
19740            })?;
19741        __struct.scale_factor = buf.get_f32_le();
19742        Ok(__struct)
19743    }
19744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19745        let mut __tmp = BytesMut::new(bytes);
19746        #[allow(clippy::absurd_extreme_comparisons)]
19747        #[allow(unused_comparisons)]
19748        if __tmp.remaining() < Self::ENCODED_LEN {
19749            panic!(
19750                "buffer is too small (need {} bytes, but got {})",
19751                Self::ENCODED_LEN,
19752                __tmp.remaining(),
19753            )
19754        }
19755        __tmp.put_f32_le(self.fitness);
19756        __tmp.put_f32_le(self.ofs_x);
19757        __tmp.put_f32_le(self.ofs_y);
19758        __tmp.put_f32_le(self.ofs_z);
19759        __tmp.put_f32_le(self.diag_x);
19760        __tmp.put_f32_le(self.diag_y);
19761        __tmp.put_f32_le(self.diag_z);
19762        __tmp.put_f32_le(self.offdiag_x);
19763        __tmp.put_f32_le(self.offdiag_y);
19764        __tmp.put_f32_le(self.offdiag_z);
19765        __tmp.put_u8(self.compass_id);
19766        __tmp.put_u8(self.cal_mask);
19767        __tmp.put_u8(self.cal_status as u8);
19768        __tmp.put_u8(self.autosaved);
19769        if matches!(version, MavlinkVersion::V2) {
19770            __tmp.put_f32_le(self.orientation_confidence);
19771            __tmp.put_u8(self.old_orientation as u8);
19772            __tmp.put_u8(self.new_orientation as u8);
19773            __tmp.put_f32_le(self.scale_factor);
19774            let len = __tmp.len();
19775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19776        } else {
19777            __tmp.len()
19778        }
19779    }
19780}
19781#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19782#[doc = ""]
19783#[doc = "ID: 69"]
19784#[derive(Debug, Clone, PartialEq)]
19785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19787#[cfg_attr(feature = "ts", derive(TS))]
19788#[cfg_attr(feature = "ts", ts(export))]
19789pub struct MANUAL_CONTROL_DATA {
19790    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19791    pub x: i16,
19792    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19793    pub y: i16,
19794    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19795    pub z: i16,
19796    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19797    pub r: i16,
19798    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19799    pub buttons: u16,
19800    #[doc = "The system to be controlled."]
19801    pub target: u8,
19802    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19803    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19804    pub buttons2: u16,
19805    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19807    pub enabled_extensions: u8,
19808    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19809    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19810    pub s: i16,
19811    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19812    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19813    pub t: i16,
19814    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19815    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19816    pub aux1: i16,
19817    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19818    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19819    pub aux2: i16,
19820    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19822    pub aux3: i16,
19823    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19825    pub aux4: i16,
19826    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19828    pub aux5: i16,
19829    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19830    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19831    pub aux6: i16,
19832}
19833impl MANUAL_CONTROL_DATA {
19834    pub const ENCODED_LEN: usize = 30usize;
19835    pub const DEFAULT: Self = Self {
19836        x: 0_i16,
19837        y: 0_i16,
19838        z: 0_i16,
19839        r: 0_i16,
19840        buttons: 0_u16,
19841        target: 0_u8,
19842        buttons2: 0_u16,
19843        enabled_extensions: 0_u8,
19844        s: 0_i16,
19845        t: 0_i16,
19846        aux1: 0_i16,
19847        aux2: 0_i16,
19848        aux3: 0_i16,
19849        aux4: 0_i16,
19850        aux5: 0_i16,
19851        aux6: 0_i16,
19852    };
19853    #[cfg(feature = "arbitrary")]
19854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19855        use arbitrary::{Arbitrary, Unstructured};
19856        let mut buf = [0u8; 1024];
19857        rng.fill_bytes(&mut buf);
19858        let mut unstructured = Unstructured::new(&buf);
19859        Self::arbitrary(&mut unstructured).unwrap_or_default()
19860    }
19861}
19862impl Default for MANUAL_CONTROL_DATA {
19863    fn default() -> Self {
19864        Self::DEFAULT.clone()
19865    }
19866}
19867impl MessageData for MANUAL_CONTROL_DATA {
19868    type Message = MavMessage;
19869    const ID: u32 = 69u32;
19870    const NAME: &'static str = "MANUAL_CONTROL";
19871    const EXTRA_CRC: u8 = 243u8;
19872    const ENCODED_LEN: usize = 30usize;
19873    fn deser(
19874        _version: MavlinkVersion,
19875        __input: &[u8],
19876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19877        let avail_len = __input.len();
19878        let mut payload_buf = [0; Self::ENCODED_LEN];
19879        let mut buf = if avail_len < Self::ENCODED_LEN {
19880            payload_buf[0..avail_len].copy_from_slice(__input);
19881            Bytes::new(&payload_buf)
19882        } else {
19883            Bytes::new(__input)
19884        };
19885        let mut __struct = Self::default();
19886        __struct.x = buf.get_i16_le();
19887        __struct.y = buf.get_i16_le();
19888        __struct.z = buf.get_i16_le();
19889        __struct.r = buf.get_i16_le();
19890        __struct.buttons = buf.get_u16_le();
19891        __struct.target = buf.get_u8();
19892        __struct.buttons2 = buf.get_u16_le();
19893        __struct.enabled_extensions = buf.get_u8();
19894        __struct.s = buf.get_i16_le();
19895        __struct.t = buf.get_i16_le();
19896        __struct.aux1 = buf.get_i16_le();
19897        __struct.aux2 = buf.get_i16_le();
19898        __struct.aux3 = buf.get_i16_le();
19899        __struct.aux4 = buf.get_i16_le();
19900        __struct.aux5 = buf.get_i16_le();
19901        __struct.aux6 = buf.get_i16_le();
19902        Ok(__struct)
19903    }
19904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19905        let mut __tmp = BytesMut::new(bytes);
19906        #[allow(clippy::absurd_extreme_comparisons)]
19907        #[allow(unused_comparisons)]
19908        if __tmp.remaining() < Self::ENCODED_LEN {
19909            panic!(
19910                "buffer is too small (need {} bytes, but got {})",
19911                Self::ENCODED_LEN,
19912                __tmp.remaining(),
19913            )
19914        }
19915        __tmp.put_i16_le(self.x);
19916        __tmp.put_i16_le(self.y);
19917        __tmp.put_i16_le(self.z);
19918        __tmp.put_i16_le(self.r);
19919        __tmp.put_u16_le(self.buttons);
19920        __tmp.put_u8(self.target);
19921        if matches!(version, MavlinkVersion::V2) {
19922            __tmp.put_u16_le(self.buttons2);
19923            __tmp.put_u8(self.enabled_extensions);
19924            __tmp.put_i16_le(self.s);
19925            __tmp.put_i16_le(self.t);
19926            __tmp.put_i16_le(self.aux1);
19927            __tmp.put_i16_le(self.aux2);
19928            __tmp.put_i16_le(self.aux3);
19929            __tmp.put_i16_le(self.aux4);
19930            __tmp.put_i16_le(self.aux5);
19931            __tmp.put_i16_le(self.aux6);
19932            let len = __tmp.len();
19933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19934        } else {
19935            __tmp.len()
19936        }
19937    }
19938}
19939#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19940#[doc = ""]
19941#[doc = "ID: 81"]
19942#[derive(Debug, Clone, PartialEq)]
19943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19945#[cfg_attr(feature = "ts", derive(TS))]
19946#[cfg_attr(feature = "ts", ts(export))]
19947pub struct MANUAL_SETPOINT_DATA {
19948    #[doc = "Timestamp (time since system boot)."]
19949    pub time_boot_ms: u32,
19950    #[doc = "Desired roll rate"]
19951    pub roll: f32,
19952    #[doc = "Desired pitch rate"]
19953    pub pitch: f32,
19954    #[doc = "Desired yaw rate"]
19955    pub yaw: f32,
19956    #[doc = "Collective thrust, normalized to 0 .. 1"]
19957    pub thrust: f32,
19958    #[doc = "Flight mode switch position, 0.. 255"]
19959    pub mode_switch: u8,
19960    #[doc = "Override mode switch position, 0.. 255"]
19961    pub manual_override_switch: u8,
19962}
19963impl MANUAL_SETPOINT_DATA {
19964    pub const ENCODED_LEN: usize = 22usize;
19965    pub const DEFAULT: Self = Self {
19966        time_boot_ms: 0_u32,
19967        roll: 0.0_f32,
19968        pitch: 0.0_f32,
19969        yaw: 0.0_f32,
19970        thrust: 0.0_f32,
19971        mode_switch: 0_u8,
19972        manual_override_switch: 0_u8,
19973    };
19974    #[cfg(feature = "arbitrary")]
19975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19976        use arbitrary::{Arbitrary, Unstructured};
19977        let mut buf = [0u8; 1024];
19978        rng.fill_bytes(&mut buf);
19979        let mut unstructured = Unstructured::new(&buf);
19980        Self::arbitrary(&mut unstructured).unwrap_or_default()
19981    }
19982}
19983impl Default for MANUAL_SETPOINT_DATA {
19984    fn default() -> Self {
19985        Self::DEFAULT.clone()
19986    }
19987}
19988impl MessageData for MANUAL_SETPOINT_DATA {
19989    type Message = MavMessage;
19990    const ID: u32 = 81u32;
19991    const NAME: &'static str = "MANUAL_SETPOINT";
19992    const EXTRA_CRC: u8 = 106u8;
19993    const ENCODED_LEN: usize = 22usize;
19994    fn deser(
19995        _version: MavlinkVersion,
19996        __input: &[u8],
19997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19998        let avail_len = __input.len();
19999        let mut payload_buf = [0; Self::ENCODED_LEN];
20000        let mut buf = if avail_len < Self::ENCODED_LEN {
20001            payload_buf[0..avail_len].copy_from_slice(__input);
20002            Bytes::new(&payload_buf)
20003        } else {
20004            Bytes::new(__input)
20005        };
20006        let mut __struct = Self::default();
20007        __struct.time_boot_ms = buf.get_u32_le();
20008        __struct.roll = buf.get_f32_le();
20009        __struct.pitch = buf.get_f32_le();
20010        __struct.yaw = buf.get_f32_le();
20011        __struct.thrust = buf.get_f32_le();
20012        __struct.mode_switch = buf.get_u8();
20013        __struct.manual_override_switch = buf.get_u8();
20014        Ok(__struct)
20015    }
20016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20017        let mut __tmp = BytesMut::new(bytes);
20018        #[allow(clippy::absurd_extreme_comparisons)]
20019        #[allow(unused_comparisons)]
20020        if __tmp.remaining() < Self::ENCODED_LEN {
20021            panic!(
20022                "buffer is too small (need {} bytes, but got {})",
20023                Self::ENCODED_LEN,
20024                __tmp.remaining(),
20025            )
20026        }
20027        __tmp.put_u32_le(self.time_boot_ms);
20028        __tmp.put_f32_le(self.roll);
20029        __tmp.put_f32_le(self.pitch);
20030        __tmp.put_f32_le(self.yaw);
20031        __tmp.put_f32_le(self.thrust);
20032        __tmp.put_u8(self.mode_switch);
20033        __tmp.put_u8(self.manual_override_switch);
20034        if matches!(version, MavlinkVersion::V2) {
20035            let len = __tmp.len();
20036            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20037        } else {
20038            __tmp.len()
20039        }
20040    }
20041}
20042#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20043#[doc = ""]
20044#[doc = "ID: 249"]
20045#[derive(Debug, Clone, PartialEq)]
20046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20048#[cfg_attr(feature = "ts", derive(TS))]
20049#[cfg_attr(feature = "ts", ts(export))]
20050pub struct MEMORY_VECT_DATA {
20051    #[doc = "Starting address of the debug variables"]
20052    pub address: u16,
20053    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
20054    pub ver: u8,
20055    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
20056    pub mavtype: u8,
20057    #[doc = "Memory contents at specified address"]
20058    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20059    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20060    pub value: [i8; 32],
20061}
20062impl MEMORY_VECT_DATA {
20063    pub const ENCODED_LEN: usize = 36usize;
20064    pub const DEFAULT: Self = Self {
20065        address: 0_u16,
20066        ver: 0_u8,
20067        mavtype: 0_u8,
20068        value: [0_i8; 32usize],
20069    };
20070    #[cfg(feature = "arbitrary")]
20071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20072        use arbitrary::{Arbitrary, Unstructured};
20073        let mut buf = [0u8; 1024];
20074        rng.fill_bytes(&mut buf);
20075        let mut unstructured = Unstructured::new(&buf);
20076        Self::arbitrary(&mut unstructured).unwrap_or_default()
20077    }
20078}
20079impl Default for MEMORY_VECT_DATA {
20080    fn default() -> Self {
20081        Self::DEFAULT.clone()
20082    }
20083}
20084impl MessageData for MEMORY_VECT_DATA {
20085    type Message = MavMessage;
20086    const ID: u32 = 249u32;
20087    const NAME: &'static str = "MEMORY_VECT";
20088    const EXTRA_CRC: u8 = 204u8;
20089    const ENCODED_LEN: usize = 36usize;
20090    fn deser(
20091        _version: MavlinkVersion,
20092        __input: &[u8],
20093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20094        let avail_len = __input.len();
20095        let mut payload_buf = [0; Self::ENCODED_LEN];
20096        let mut buf = if avail_len < Self::ENCODED_LEN {
20097            payload_buf[0..avail_len].copy_from_slice(__input);
20098            Bytes::new(&payload_buf)
20099        } else {
20100            Bytes::new(__input)
20101        };
20102        let mut __struct = Self::default();
20103        __struct.address = buf.get_u16_le();
20104        __struct.ver = buf.get_u8();
20105        __struct.mavtype = buf.get_u8();
20106        for v in &mut __struct.value {
20107            let val = buf.get_i8();
20108            *v = val;
20109        }
20110        Ok(__struct)
20111    }
20112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20113        let mut __tmp = BytesMut::new(bytes);
20114        #[allow(clippy::absurd_extreme_comparisons)]
20115        #[allow(unused_comparisons)]
20116        if __tmp.remaining() < Self::ENCODED_LEN {
20117            panic!(
20118                "buffer is too small (need {} bytes, but got {})",
20119                Self::ENCODED_LEN,
20120                __tmp.remaining(),
20121            )
20122        }
20123        __tmp.put_u16_le(self.address);
20124        __tmp.put_u8(self.ver);
20125        __tmp.put_u8(self.mavtype);
20126        for val in &self.value {
20127            __tmp.put_i8(*val);
20128        }
20129        if matches!(version, MavlinkVersion::V2) {
20130            let len = __tmp.len();
20131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20132        } else {
20133            __tmp.len()
20134        }
20135    }
20136}
20137#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20138#[doc = ""]
20139#[doc = "ID: 244"]
20140#[derive(Debug, Clone, PartialEq)]
20141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20143#[cfg_attr(feature = "ts", derive(TS))]
20144#[cfg_attr(feature = "ts", ts(export))]
20145pub struct MESSAGE_INTERVAL_DATA {
20146    #[doc = "0 indicates the interval at which it is sent."]
20147    pub interval_us: i32,
20148    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20149    pub message_id: u16,
20150}
20151impl MESSAGE_INTERVAL_DATA {
20152    pub const ENCODED_LEN: usize = 6usize;
20153    pub const DEFAULT: Self = Self {
20154        interval_us: 0_i32,
20155        message_id: 0_u16,
20156    };
20157    #[cfg(feature = "arbitrary")]
20158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20159        use arbitrary::{Arbitrary, Unstructured};
20160        let mut buf = [0u8; 1024];
20161        rng.fill_bytes(&mut buf);
20162        let mut unstructured = Unstructured::new(&buf);
20163        Self::arbitrary(&mut unstructured).unwrap_or_default()
20164    }
20165}
20166impl Default for MESSAGE_INTERVAL_DATA {
20167    fn default() -> Self {
20168        Self::DEFAULT.clone()
20169    }
20170}
20171impl MessageData for MESSAGE_INTERVAL_DATA {
20172    type Message = MavMessage;
20173    const ID: u32 = 244u32;
20174    const NAME: &'static str = "MESSAGE_INTERVAL";
20175    const EXTRA_CRC: u8 = 95u8;
20176    const ENCODED_LEN: usize = 6usize;
20177    fn deser(
20178        _version: MavlinkVersion,
20179        __input: &[u8],
20180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20181        let avail_len = __input.len();
20182        let mut payload_buf = [0; Self::ENCODED_LEN];
20183        let mut buf = if avail_len < Self::ENCODED_LEN {
20184            payload_buf[0..avail_len].copy_from_slice(__input);
20185            Bytes::new(&payload_buf)
20186        } else {
20187            Bytes::new(__input)
20188        };
20189        let mut __struct = Self::default();
20190        __struct.interval_us = buf.get_i32_le();
20191        __struct.message_id = buf.get_u16_le();
20192        Ok(__struct)
20193    }
20194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20195        let mut __tmp = BytesMut::new(bytes);
20196        #[allow(clippy::absurd_extreme_comparisons)]
20197        #[allow(unused_comparisons)]
20198        if __tmp.remaining() < Self::ENCODED_LEN {
20199            panic!(
20200                "buffer is too small (need {} bytes, but got {})",
20201                Self::ENCODED_LEN,
20202                __tmp.remaining(),
20203            )
20204        }
20205        __tmp.put_i32_le(self.interval_us);
20206        __tmp.put_u16_le(self.message_id);
20207        if matches!(version, MavlinkVersion::V2) {
20208            let len = __tmp.len();
20209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20210        } else {
20211            __tmp.len()
20212        }
20213    }
20214}
20215#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20216#[doc = ""]
20217#[doc = "ID: 47"]
20218#[derive(Debug, Clone, PartialEq)]
20219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20221#[cfg_attr(feature = "ts", derive(TS))]
20222#[cfg_attr(feature = "ts", ts(export))]
20223pub struct MISSION_ACK_DATA {
20224    #[doc = "System ID"]
20225    pub target_system: u8,
20226    #[doc = "Component ID"]
20227    pub target_component: u8,
20228    #[doc = "Mission result."]
20229    pub mavtype: MavMissionResult,
20230    #[doc = "Mission type."]
20231    #[cfg_attr(feature = "serde", serde(default))]
20232    pub mission_type: MavMissionType,
20233    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20235    pub opaque_id: u32,
20236}
20237impl MISSION_ACK_DATA {
20238    pub const ENCODED_LEN: usize = 8usize;
20239    pub const DEFAULT: Self = Self {
20240        target_system: 0_u8,
20241        target_component: 0_u8,
20242        mavtype: MavMissionResult::DEFAULT,
20243        mission_type: MavMissionType::DEFAULT,
20244        opaque_id: 0_u32,
20245    };
20246    #[cfg(feature = "arbitrary")]
20247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20248        use arbitrary::{Arbitrary, Unstructured};
20249        let mut buf = [0u8; 1024];
20250        rng.fill_bytes(&mut buf);
20251        let mut unstructured = Unstructured::new(&buf);
20252        Self::arbitrary(&mut unstructured).unwrap_or_default()
20253    }
20254}
20255impl Default for MISSION_ACK_DATA {
20256    fn default() -> Self {
20257        Self::DEFAULT.clone()
20258    }
20259}
20260impl MessageData for MISSION_ACK_DATA {
20261    type Message = MavMessage;
20262    const ID: u32 = 47u32;
20263    const NAME: &'static str = "MISSION_ACK";
20264    const EXTRA_CRC: u8 = 153u8;
20265    const ENCODED_LEN: usize = 8usize;
20266    fn deser(
20267        _version: MavlinkVersion,
20268        __input: &[u8],
20269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20270        let avail_len = __input.len();
20271        let mut payload_buf = [0; Self::ENCODED_LEN];
20272        let mut buf = if avail_len < Self::ENCODED_LEN {
20273            payload_buf[0..avail_len].copy_from_slice(__input);
20274            Bytes::new(&payload_buf)
20275        } else {
20276            Bytes::new(__input)
20277        };
20278        let mut __struct = Self::default();
20279        __struct.target_system = buf.get_u8();
20280        __struct.target_component = buf.get_u8();
20281        let tmp = buf.get_u8();
20282        __struct.mavtype =
20283            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20284                enum_type: "MavMissionResult",
20285                value: tmp as u32,
20286            })?;
20287        let tmp = buf.get_u8();
20288        __struct.mission_type =
20289            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20290                enum_type: "MavMissionType",
20291                value: tmp as u32,
20292            })?;
20293        __struct.opaque_id = buf.get_u32_le();
20294        Ok(__struct)
20295    }
20296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20297        let mut __tmp = BytesMut::new(bytes);
20298        #[allow(clippy::absurd_extreme_comparisons)]
20299        #[allow(unused_comparisons)]
20300        if __tmp.remaining() < Self::ENCODED_LEN {
20301            panic!(
20302                "buffer is too small (need {} bytes, but got {})",
20303                Self::ENCODED_LEN,
20304                __tmp.remaining(),
20305            )
20306        }
20307        __tmp.put_u8(self.target_system);
20308        __tmp.put_u8(self.target_component);
20309        __tmp.put_u8(self.mavtype as u8);
20310        if matches!(version, MavlinkVersion::V2) {
20311            __tmp.put_u8(self.mission_type as u8);
20312            __tmp.put_u32_le(self.opaque_id);
20313            let len = __tmp.len();
20314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20315        } else {
20316            __tmp.len()
20317        }
20318    }
20319}
20320#[doc = "Delete all mission items at once."]
20321#[doc = ""]
20322#[doc = "ID: 45"]
20323#[derive(Debug, Clone, PartialEq)]
20324#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20325#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20326#[cfg_attr(feature = "ts", derive(TS))]
20327#[cfg_attr(feature = "ts", ts(export))]
20328pub struct MISSION_CLEAR_ALL_DATA {
20329    #[doc = "System ID"]
20330    pub target_system: u8,
20331    #[doc = "Component ID"]
20332    pub target_component: u8,
20333    #[doc = "Mission type."]
20334    #[cfg_attr(feature = "serde", serde(default))]
20335    pub mission_type: MavMissionType,
20336}
20337impl MISSION_CLEAR_ALL_DATA {
20338    pub const ENCODED_LEN: usize = 3usize;
20339    pub const DEFAULT: Self = Self {
20340        target_system: 0_u8,
20341        target_component: 0_u8,
20342        mission_type: MavMissionType::DEFAULT,
20343    };
20344    #[cfg(feature = "arbitrary")]
20345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20346        use arbitrary::{Arbitrary, Unstructured};
20347        let mut buf = [0u8; 1024];
20348        rng.fill_bytes(&mut buf);
20349        let mut unstructured = Unstructured::new(&buf);
20350        Self::arbitrary(&mut unstructured).unwrap_or_default()
20351    }
20352}
20353impl Default for MISSION_CLEAR_ALL_DATA {
20354    fn default() -> Self {
20355        Self::DEFAULT.clone()
20356    }
20357}
20358impl MessageData for MISSION_CLEAR_ALL_DATA {
20359    type Message = MavMessage;
20360    const ID: u32 = 45u32;
20361    const NAME: &'static str = "MISSION_CLEAR_ALL";
20362    const EXTRA_CRC: u8 = 232u8;
20363    const ENCODED_LEN: usize = 3usize;
20364    fn deser(
20365        _version: MavlinkVersion,
20366        __input: &[u8],
20367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20368        let avail_len = __input.len();
20369        let mut payload_buf = [0; Self::ENCODED_LEN];
20370        let mut buf = if avail_len < Self::ENCODED_LEN {
20371            payload_buf[0..avail_len].copy_from_slice(__input);
20372            Bytes::new(&payload_buf)
20373        } else {
20374            Bytes::new(__input)
20375        };
20376        let mut __struct = Self::default();
20377        __struct.target_system = buf.get_u8();
20378        __struct.target_component = buf.get_u8();
20379        let tmp = buf.get_u8();
20380        __struct.mission_type =
20381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20382                enum_type: "MavMissionType",
20383                value: tmp as u32,
20384            })?;
20385        Ok(__struct)
20386    }
20387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20388        let mut __tmp = BytesMut::new(bytes);
20389        #[allow(clippy::absurd_extreme_comparisons)]
20390        #[allow(unused_comparisons)]
20391        if __tmp.remaining() < Self::ENCODED_LEN {
20392            panic!(
20393                "buffer is too small (need {} bytes, but got {})",
20394                Self::ENCODED_LEN,
20395                __tmp.remaining(),
20396            )
20397        }
20398        __tmp.put_u8(self.target_system);
20399        __tmp.put_u8(self.target_component);
20400        if matches!(version, MavlinkVersion::V2) {
20401            __tmp.put_u8(self.mission_type as u8);
20402            let len = __tmp.len();
20403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20404        } else {
20405            __tmp.len()
20406        }
20407    }
20408}
20409#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20410#[doc = ""]
20411#[doc = "ID: 44"]
20412#[derive(Debug, Clone, PartialEq)]
20413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20415#[cfg_attr(feature = "ts", derive(TS))]
20416#[cfg_attr(feature = "ts", ts(export))]
20417pub struct MISSION_COUNT_DATA {
20418    #[doc = "Number of mission items in the sequence"]
20419    pub count: u16,
20420    #[doc = "System ID"]
20421    pub target_system: u8,
20422    #[doc = "Component ID"]
20423    pub target_component: u8,
20424    #[doc = "Mission type."]
20425    #[cfg_attr(feature = "serde", serde(default))]
20426    pub mission_type: MavMissionType,
20427    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20429    pub opaque_id: u32,
20430}
20431impl MISSION_COUNT_DATA {
20432    pub const ENCODED_LEN: usize = 9usize;
20433    pub const DEFAULT: Self = Self {
20434        count: 0_u16,
20435        target_system: 0_u8,
20436        target_component: 0_u8,
20437        mission_type: MavMissionType::DEFAULT,
20438        opaque_id: 0_u32,
20439    };
20440    #[cfg(feature = "arbitrary")]
20441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20442        use arbitrary::{Arbitrary, Unstructured};
20443        let mut buf = [0u8; 1024];
20444        rng.fill_bytes(&mut buf);
20445        let mut unstructured = Unstructured::new(&buf);
20446        Self::arbitrary(&mut unstructured).unwrap_or_default()
20447    }
20448}
20449impl Default for MISSION_COUNT_DATA {
20450    fn default() -> Self {
20451        Self::DEFAULT.clone()
20452    }
20453}
20454impl MessageData for MISSION_COUNT_DATA {
20455    type Message = MavMessage;
20456    const ID: u32 = 44u32;
20457    const NAME: &'static str = "MISSION_COUNT";
20458    const EXTRA_CRC: u8 = 221u8;
20459    const ENCODED_LEN: usize = 9usize;
20460    fn deser(
20461        _version: MavlinkVersion,
20462        __input: &[u8],
20463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20464        let avail_len = __input.len();
20465        let mut payload_buf = [0; Self::ENCODED_LEN];
20466        let mut buf = if avail_len < Self::ENCODED_LEN {
20467            payload_buf[0..avail_len].copy_from_slice(__input);
20468            Bytes::new(&payload_buf)
20469        } else {
20470            Bytes::new(__input)
20471        };
20472        let mut __struct = Self::default();
20473        __struct.count = buf.get_u16_le();
20474        __struct.target_system = buf.get_u8();
20475        __struct.target_component = buf.get_u8();
20476        let tmp = buf.get_u8();
20477        __struct.mission_type =
20478            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20479                enum_type: "MavMissionType",
20480                value: tmp as u32,
20481            })?;
20482        __struct.opaque_id = buf.get_u32_le();
20483        Ok(__struct)
20484    }
20485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20486        let mut __tmp = BytesMut::new(bytes);
20487        #[allow(clippy::absurd_extreme_comparisons)]
20488        #[allow(unused_comparisons)]
20489        if __tmp.remaining() < Self::ENCODED_LEN {
20490            panic!(
20491                "buffer is too small (need {} bytes, but got {})",
20492                Self::ENCODED_LEN,
20493                __tmp.remaining(),
20494            )
20495        }
20496        __tmp.put_u16_le(self.count);
20497        __tmp.put_u8(self.target_system);
20498        __tmp.put_u8(self.target_component);
20499        if matches!(version, MavlinkVersion::V2) {
20500            __tmp.put_u8(self.mission_type as u8);
20501            __tmp.put_u32_le(self.opaque_id);
20502            let len = __tmp.len();
20503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20504        } else {
20505            __tmp.len()
20506        }
20507    }
20508}
20509#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20510#[doc = ""]
20511#[doc = "ID: 42"]
20512#[derive(Debug, Clone, PartialEq)]
20513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20515#[cfg_attr(feature = "ts", derive(TS))]
20516#[cfg_attr(feature = "ts", ts(export))]
20517pub struct MISSION_CURRENT_DATA {
20518    #[doc = "Sequence"]
20519    pub seq: u16,
20520    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20522    pub total: u16,
20523    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20524    #[cfg_attr(feature = "serde", serde(default))]
20525    pub mission_state: MissionState,
20526    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20528    pub mission_mode: u8,
20529    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20531    pub mission_id: u32,
20532    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20534    pub fence_id: u32,
20535    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20537    pub rally_points_id: u32,
20538}
20539impl MISSION_CURRENT_DATA {
20540    pub const ENCODED_LEN: usize = 18usize;
20541    pub const DEFAULT: Self = Self {
20542        seq: 0_u16,
20543        total: 0_u16,
20544        mission_state: MissionState::DEFAULT,
20545        mission_mode: 0_u8,
20546        mission_id: 0_u32,
20547        fence_id: 0_u32,
20548        rally_points_id: 0_u32,
20549    };
20550    #[cfg(feature = "arbitrary")]
20551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20552        use arbitrary::{Arbitrary, Unstructured};
20553        let mut buf = [0u8; 1024];
20554        rng.fill_bytes(&mut buf);
20555        let mut unstructured = Unstructured::new(&buf);
20556        Self::arbitrary(&mut unstructured).unwrap_or_default()
20557    }
20558}
20559impl Default for MISSION_CURRENT_DATA {
20560    fn default() -> Self {
20561        Self::DEFAULT.clone()
20562    }
20563}
20564impl MessageData for MISSION_CURRENT_DATA {
20565    type Message = MavMessage;
20566    const ID: u32 = 42u32;
20567    const NAME: &'static str = "MISSION_CURRENT";
20568    const EXTRA_CRC: u8 = 28u8;
20569    const ENCODED_LEN: usize = 18usize;
20570    fn deser(
20571        _version: MavlinkVersion,
20572        __input: &[u8],
20573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20574        let avail_len = __input.len();
20575        let mut payload_buf = [0; Self::ENCODED_LEN];
20576        let mut buf = if avail_len < Self::ENCODED_LEN {
20577            payload_buf[0..avail_len].copy_from_slice(__input);
20578            Bytes::new(&payload_buf)
20579        } else {
20580            Bytes::new(__input)
20581        };
20582        let mut __struct = Self::default();
20583        __struct.seq = buf.get_u16_le();
20584        __struct.total = buf.get_u16_le();
20585        let tmp = buf.get_u8();
20586        __struct.mission_state =
20587            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20588                enum_type: "MissionState",
20589                value: tmp as u32,
20590            })?;
20591        __struct.mission_mode = buf.get_u8();
20592        __struct.mission_id = buf.get_u32_le();
20593        __struct.fence_id = buf.get_u32_le();
20594        __struct.rally_points_id = buf.get_u32_le();
20595        Ok(__struct)
20596    }
20597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20598        let mut __tmp = BytesMut::new(bytes);
20599        #[allow(clippy::absurd_extreme_comparisons)]
20600        #[allow(unused_comparisons)]
20601        if __tmp.remaining() < Self::ENCODED_LEN {
20602            panic!(
20603                "buffer is too small (need {} bytes, but got {})",
20604                Self::ENCODED_LEN,
20605                __tmp.remaining(),
20606            )
20607        }
20608        __tmp.put_u16_le(self.seq);
20609        if matches!(version, MavlinkVersion::V2) {
20610            __tmp.put_u16_le(self.total);
20611            __tmp.put_u8(self.mission_state as u8);
20612            __tmp.put_u8(self.mission_mode);
20613            __tmp.put_u32_le(self.mission_id);
20614            __tmp.put_u32_le(self.fence_id);
20615            __tmp.put_u32_le(self.rally_points_id);
20616            let len = __tmp.len();
20617            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20618        } else {
20619            __tmp.len()
20620        }
20621    }
20622}
20623#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20624#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20625#[doc = ""]
20626#[doc = "ID: 39"]
20627#[derive(Debug, Clone, PartialEq)]
20628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20630#[cfg_attr(feature = "ts", derive(TS))]
20631#[cfg_attr(feature = "ts", ts(export))]
20632pub struct MISSION_ITEM_DATA {
20633    #[doc = "PARAM1, see MAV_CMD enum"]
20634    pub param1: f32,
20635    #[doc = "PARAM2, see MAV_CMD enum"]
20636    pub param2: f32,
20637    #[doc = "PARAM3, see MAV_CMD enum"]
20638    pub param3: f32,
20639    #[doc = "PARAM4, see MAV_CMD enum"]
20640    pub param4: f32,
20641    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20642    pub x: f32,
20643    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20644    pub y: f32,
20645    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20646    pub z: f32,
20647    #[doc = "Sequence"]
20648    pub seq: u16,
20649    #[doc = "The scheduled action for the waypoint."]
20650    pub command: MavCmd,
20651    #[doc = "System ID"]
20652    pub target_system: u8,
20653    #[doc = "Component ID"]
20654    pub target_component: u8,
20655    #[doc = "The coordinate system of the waypoint."]
20656    pub frame: MavFrame,
20657    #[doc = "false:0, true:1"]
20658    pub current: u8,
20659    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20660    pub autocontinue: u8,
20661    #[doc = "Mission type."]
20662    #[cfg_attr(feature = "serde", serde(default))]
20663    pub mission_type: MavMissionType,
20664}
20665impl MISSION_ITEM_DATA {
20666    pub const ENCODED_LEN: usize = 38usize;
20667    pub const DEFAULT: Self = Self {
20668        param1: 0.0_f32,
20669        param2: 0.0_f32,
20670        param3: 0.0_f32,
20671        param4: 0.0_f32,
20672        x: 0.0_f32,
20673        y: 0.0_f32,
20674        z: 0.0_f32,
20675        seq: 0_u16,
20676        command: MavCmd::DEFAULT,
20677        target_system: 0_u8,
20678        target_component: 0_u8,
20679        frame: MavFrame::DEFAULT,
20680        current: 0_u8,
20681        autocontinue: 0_u8,
20682        mission_type: MavMissionType::DEFAULT,
20683    };
20684    #[cfg(feature = "arbitrary")]
20685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20686        use arbitrary::{Arbitrary, Unstructured};
20687        let mut buf = [0u8; 1024];
20688        rng.fill_bytes(&mut buf);
20689        let mut unstructured = Unstructured::new(&buf);
20690        Self::arbitrary(&mut unstructured).unwrap_or_default()
20691    }
20692}
20693impl Default for MISSION_ITEM_DATA {
20694    fn default() -> Self {
20695        Self::DEFAULT.clone()
20696    }
20697}
20698impl MessageData for MISSION_ITEM_DATA {
20699    type Message = MavMessage;
20700    const ID: u32 = 39u32;
20701    const NAME: &'static str = "MISSION_ITEM";
20702    const EXTRA_CRC: u8 = 254u8;
20703    const ENCODED_LEN: usize = 38usize;
20704    fn deser(
20705        _version: MavlinkVersion,
20706        __input: &[u8],
20707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20708        let avail_len = __input.len();
20709        let mut payload_buf = [0; Self::ENCODED_LEN];
20710        let mut buf = if avail_len < Self::ENCODED_LEN {
20711            payload_buf[0..avail_len].copy_from_slice(__input);
20712            Bytes::new(&payload_buf)
20713        } else {
20714            Bytes::new(__input)
20715        };
20716        let mut __struct = Self::default();
20717        __struct.param1 = buf.get_f32_le();
20718        __struct.param2 = buf.get_f32_le();
20719        __struct.param3 = buf.get_f32_le();
20720        __struct.param4 = buf.get_f32_le();
20721        __struct.x = buf.get_f32_le();
20722        __struct.y = buf.get_f32_le();
20723        __struct.z = buf.get_f32_le();
20724        __struct.seq = buf.get_u16_le();
20725        let tmp = buf.get_u16_le();
20726        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20727            ::mavlink_core::error::ParserError::InvalidEnum {
20728                enum_type: "MavCmd",
20729                value: tmp as u32,
20730            },
20731        )?;
20732        __struct.target_system = buf.get_u8();
20733        __struct.target_component = buf.get_u8();
20734        let tmp = buf.get_u8();
20735        __struct.frame =
20736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20737                enum_type: "MavFrame",
20738                value: tmp as u32,
20739            })?;
20740        __struct.current = buf.get_u8();
20741        __struct.autocontinue = buf.get_u8();
20742        let tmp = buf.get_u8();
20743        __struct.mission_type =
20744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20745                enum_type: "MavMissionType",
20746                value: tmp as u32,
20747            })?;
20748        Ok(__struct)
20749    }
20750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20751        let mut __tmp = BytesMut::new(bytes);
20752        #[allow(clippy::absurd_extreme_comparisons)]
20753        #[allow(unused_comparisons)]
20754        if __tmp.remaining() < Self::ENCODED_LEN {
20755            panic!(
20756                "buffer is too small (need {} bytes, but got {})",
20757                Self::ENCODED_LEN,
20758                __tmp.remaining(),
20759            )
20760        }
20761        __tmp.put_f32_le(self.param1);
20762        __tmp.put_f32_le(self.param2);
20763        __tmp.put_f32_le(self.param3);
20764        __tmp.put_f32_le(self.param4);
20765        __tmp.put_f32_le(self.x);
20766        __tmp.put_f32_le(self.y);
20767        __tmp.put_f32_le(self.z);
20768        __tmp.put_u16_le(self.seq);
20769        __tmp.put_u16_le(self.command as u16);
20770        __tmp.put_u8(self.target_system);
20771        __tmp.put_u8(self.target_component);
20772        __tmp.put_u8(self.frame as u8);
20773        __tmp.put_u8(self.current);
20774        __tmp.put_u8(self.autocontinue);
20775        if matches!(version, MavlinkVersion::V2) {
20776            __tmp.put_u8(self.mission_type as u8);
20777            let len = __tmp.len();
20778            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20779        } else {
20780            __tmp.len()
20781        }
20782    }
20783}
20784#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20785#[doc = ""]
20786#[doc = "ID: 73"]
20787#[derive(Debug, Clone, PartialEq)]
20788#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20790#[cfg_attr(feature = "ts", derive(TS))]
20791#[cfg_attr(feature = "ts", ts(export))]
20792pub struct MISSION_ITEM_INT_DATA {
20793    #[doc = "PARAM1, see MAV_CMD enum"]
20794    pub param1: f32,
20795    #[doc = "PARAM2, see MAV_CMD enum"]
20796    pub param2: f32,
20797    #[doc = "PARAM3, see MAV_CMD enum"]
20798    pub param3: f32,
20799    #[doc = "PARAM4, see MAV_CMD enum"]
20800    pub param4: f32,
20801    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20802    pub x: i32,
20803    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20804    pub y: i32,
20805    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20806    pub z: f32,
20807    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20808    pub seq: u16,
20809    #[doc = "The scheduled action for the waypoint."]
20810    pub command: MavCmd,
20811    #[doc = "System ID"]
20812    pub target_system: u8,
20813    #[doc = "Component ID"]
20814    pub target_component: u8,
20815    #[doc = "The coordinate system of the waypoint."]
20816    pub frame: MavFrame,
20817    #[doc = "false:0, true:1"]
20818    pub current: u8,
20819    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20820    pub autocontinue: u8,
20821    #[doc = "Mission type."]
20822    #[cfg_attr(feature = "serde", serde(default))]
20823    pub mission_type: MavMissionType,
20824}
20825impl MISSION_ITEM_INT_DATA {
20826    pub const ENCODED_LEN: usize = 38usize;
20827    pub const DEFAULT: Self = Self {
20828        param1: 0.0_f32,
20829        param2: 0.0_f32,
20830        param3: 0.0_f32,
20831        param4: 0.0_f32,
20832        x: 0_i32,
20833        y: 0_i32,
20834        z: 0.0_f32,
20835        seq: 0_u16,
20836        command: MavCmd::DEFAULT,
20837        target_system: 0_u8,
20838        target_component: 0_u8,
20839        frame: MavFrame::DEFAULT,
20840        current: 0_u8,
20841        autocontinue: 0_u8,
20842        mission_type: MavMissionType::DEFAULT,
20843    };
20844    #[cfg(feature = "arbitrary")]
20845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20846        use arbitrary::{Arbitrary, Unstructured};
20847        let mut buf = [0u8; 1024];
20848        rng.fill_bytes(&mut buf);
20849        let mut unstructured = Unstructured::new(&buf);
20850        Self::arbitrary(&mut unstructured).unwrap_or_default()
20851    }
20852}
20853impl Default for MISSION_ITEM_INT_DATA {
20854    fn default() -> Self {
20855        Self::DEFAULT.clone()
20856    }
20857}
20858impl MessageData for MISSION_ITEM_INT_DATA {
20859    type Message = MavMessage;
20860    const ID: u32 = 73u32;
20861    const NAME: &'static str = "MISSION_ITEM_INT";
20862    const EXTRA_CRC: u8 = 38u8;
20863    const ENCODED_LEN: usize = 38usize;
20864    fn deser(
20865        _version: MavlinkVersion,
20866        __input: &[u8],
20867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20868        let avail_len = __input.len();
20869        let mut payload_buf = [0; Self::ENCODED_LEN];
20870        let mut buf = if avail_len < Self::ENCODED_LEN {
20871            payload_buf[0..avail_len].copy_from_slice(__input);
20872            Bytes::new(&payload_buf)
20873        } else {
20874            Bytes::new(__input)
20875        };
20876        let mut __struct = Self::default();
20877        __struct.param1 = buf.get_f32_le();
20878        __struct.param2 = buf.get_f32_le();
20879        __struct.param3 = buf.get_f32_le();
20880        __struct.param4 = buf.get_f32_le();
20881        __struct.x = buf.get_i32_le();
20882        __struct.y = buf.get_i32_le();
20883        __struct.z = buf.get_f32_le();
20884        __struct.seq = buf.get_u16_le();
20885        let tmp = buf.get_u16_le();
20886        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20887            ::mavlink_core::error::ParserError::InvalidEnum {
20888                enum_type: "MavCmd",
20889                value: tmp as u32,
20890            },
20891        )?;
20892        __struct.target_system = buf.get_u8();
20893        __struct.target_component = buf.get_u8();
20894        let tmp = buf.get_u8();
20895        __struct.frame =
20896            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20897                enum_type: "MavFrame",
20898                value: tmp as u32,
20899            })?;
20900        __struct.current = buf.get_u8();
20901        __struct.autocontinue = buf.get_u8();
20902        let tmp = buf.get_u8();
20903        __struct.mission_type =
20904            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20905                enum_type: "MavMissionType",
20906                value: tmp as u32,
20907            })?;
20908        Ok(__struct)
20909    }
20910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20911        let mut __tmp = BytesMut::new(bytes);
20912        #[allow(clippy::absurd_extreme_comparisons)]
20913        #[allow(unused_comparisons)]
20914        if __tmp.remaining() < Self::ENCODED_LEN {
20915            panic!(
20916                "buffer is too small (need {} bytes, but got {})",
20917                Self::ENCODED_LEN,
20918                __tmp.remaining(),
20919            )
20920        }
20921        __tmp.put_f32_le(self.param1);
20922        __tmp.put_f32_le(self.param2);
20923        __tmp.put_f32_le(self.param3);
20924        __tmp.put_f32_le(self.param4);
20925        __tmp.put_i32_le(self.x);
20926        __tmp.put_i32_le(self.y);
20927        __tmp.put_f32_le(self.z);
20928        __tmp.put_u16_le(self.seq);
20929        __tmp.put_u16_le(self.command as u16);
20930        __tmp.put_u8(self.target_system);
20931        __tmp.put_u8(self.target_component);
20932        __tmp.put_u8(self.frame as u8);
20933        __tmp.put_u8(self.current);
20934        __tmp.put_u8(self.autocontinue);
20935        if matches!(version, MavlinkVersion::V2) {
20936            __tmp.put_u8(self.mission_type as u8);
20937            let len = __tmp.len();
20938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20939        } else {
20940            __tmp.len()
20941        }
20942    }
20943}
20944#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20945#[doc = ""]
20946#[doc = "ID: 46"]
20947#[derive(Debug, Clone, PartialEq)]
20948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20950#[cfg_attr(feature = "ts", derive(TS))]
20951#[cfg_attr(feature = "ts", ts(export))]
20952pub struct MISSION_ITEM_REACHED_DATA {
20953    #[doc = "Sequence"]
20954    pub seq: u16,
20955}
20956impl MISSION_ITEM_REACHED_DATA {
20957    pub const ENCODED_LEN: usize = 2usize;
20958    pub const DEFAULT: Self = Self { seq: 0_u16 };
20959    #[cfg(feature = "arbitrary")]
20960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20961        use arbitrary::{Arbitrary, Unstructured};
20962        let mut buf = [0u8; 1024];
20963        rng.fill_bytes(&mut buf);
20964        let mut unstructured = Unstructured::new(&buf);
20965        Self::arbitrary(&mut unstructured).unwrap_or_default()
20966    }
20967}
20968impl Default for MISSION_ITEM_REACHED_DATA {
20969    fn default() -> Self {
20970        Self::DEFAULT.clone()
20971    }
20972}
20973impl MessageData for MISSION_ITEM_REACHED_DATA {
20974    type Message = MavMessage;
20975    const ID: u32 = 46u32;
20976    const NAME: &'static str = "MISSION_ITEM_REACHED";
20977    const EXTRA_CRC: u8 = 11u8;
20978    const ENCODED_LEN: usize = 2usize;
20979    fn deser(
20980        _version: MavlinkVersion,
20981        __input: &[u8],
20982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20983        let avail_len = __input.len();
20984        let mut payload_buf = [0; Self::ENCODED_LEN];
20985        let mut buf = if avail_len < Self::ENCODED_LEN {
20986            payload_buf[0..avail_len].copy_from_slice(__input);
20987            Bytes::new(&payload_buf)
20988        } else {
20989            Bytes::new(__input)
20990        };
20991        let mut __struct = Self::default();
20992        __struct.seq = buf.get_u16_le();
20993        Ok(__struct)
20994    }
20995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20996        let mut __tmp = BytesMut::new(bytes);
20997        #[allow(clippy::absurd_extreme_comparisons)]
20998        #[allow(unused_comparisons)]
20999        if __tmp.remaining() < Self::ENCODED_LEN {
21000            panic!(
21001                "buffer is too small (need {} bytes, but got {})",
21002                Self::ENCODED_LEN,
21003                __tmp.remaining(),
21004            )
21005        }
21006        __tmp.put_u16_le(self.seq);
21007        if matches!(version, MavlinkVersion::V2) {
21008            let len = __tmp.len();
21009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21010        } else {
21011            __tmp.len()
21012        }
21013    }
21014}
21015#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
21016#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
21017#[doc = ""]
21018#[doc = "ID: 40"]
21019#[derive(Debug, Clone, PartialEq)]
21020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21022#[cfg_attr(feature = "ts", derive(TS))]
21023#[cfg_attr(feature = "ts", ts(export))]
21024pub struct MISSION_REQUEST_DATA {
21025    #[doc = "Sequence"]
21026    pub seq: u16,
21027    #[doc = "System ID"]
21028    pub target_system: u8,
21029    #[doc = "Component ID"]
21030    pub target_component: u8,
21031    #[doc = "Mission type."]
21032    #[cfg_attr(feature = "serde", serde(default))]
21033    pub mission_type: MavMissionType,
21034}
21035impl MISSION_REQUEST_DATA {
21036    pub const ENCODED_LEN: usize = 5usize;
21037    pub const DEFAULT: Self = Self {
21038        seq: 0_u16,
21039        target_system: 0_u8,
21040        target_component: 0_u8,
21041        mission_type: MavMissionType::DEFAULT,
21042    };
21043    #[cfg(feature = "arbitrary")]
21044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21045        use arbitrary::{Arbitrary, Unstructured};
21046        let mut buf = [0u8; 1024];
21047        rng.fill_bytes(&mut buf);
21048        let mut unstructured = Unstructured::new(&buf);
21049        Self::arbitrary(&mut unstructured).unwrap_or_default()
21050    }
21051}
21052impl Default for MISSION_REQUEST_DATA {
21053    fn default() -> Self {
21054        Self::DEFAULT.clone()
21055    }
21056}
21057impl MessageData for MISSION_REQUEST_DATA {
21058    type Message = MavMessage;
21059    const ID: u32 = 40u32;
21060    const NAME: &'static str = "MISSION_REQUEST";
21061    const EXTRA_CRC: u8 = 230u8;
21062    const ENCODED_LEN: usize = 5usize;
21063    fn deser(
21064        _version: MavlinkVersion,
21065        __input: &[u8],
21066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21067        let avail_len = __input.len();
21068        let mut payload_buf = [0; Self::ENCODED_LEN];
21069        let mut buf = if avail_len < Self::ENCODED_LEN {
21070            payload_buf[0..avail_len].copy_from_slice(__input);
21071            Bytes::new(&payload_buf)
21072        } else {
21073            Bytes::new(__input)
21074        };
21075        let mut __struct = Self::default();
21076        __struct.seq = buf.get_u16_le();
21077        __struct.target_system = buf.get_u8();
21078        __struct.target_component = buf.get_u8();
21079        let tmp = buf.get_u8();
21080        __struct.mission_type =
21081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21082                enum_type: "MavMissionType",
21083                value: tmp as u32,
21084            })?;
21085        Ok(__struct)
21086    }
21087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21088        let mut __tmp = BytesMut::new(bytes);
21089        #[allow(clippy::absurd_extreme_comparisons)]
21090        #[allow(unused_comparisons)]
21091        if __tmp.remaining() < Self::ENCODED_LEN {
21092            panic!(
21093                "buffer is too small (need {} bytes, but got {})",
21094                Self::ENCODED_LEN,
21095                __tmp.remaining(),
21096            )
21097        }
21098        __tmp.put_u16_le(self.seq);
21099        __tmp.put_u8(self.target_system);
21100        __tmp.put_u8(self.target_component);
21101        if matches!(version, MavlinkVersion::V2) {
21102            __tmp.put_u8(self.mission_type as u8);
21103            let len = __tmp.len();
21104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21105        } else {
21106            __tmp.len()
21107        }
21108    }
21109}
21110#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
21111#[doc = ""]
21112#[doc = "ID: 51"]
21113#[derive(Debug, Clone, PartialEq)]
21114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21116#[cfg_attr(feature = "ts", derive(TS))]
21117#[cfg_attr(feature = "ts", ts(export))]
21118pub struct MISSION_REQUEST_INT_DATA {
21119    #[doc = "Sequence"]
21120    pub seq: u16,
21121    #[doc = "System ID"]
21122    pub target_system: u8,
21123    #[doc = "Component ID"]
21124    pub target_component: u8,
21125    #[doc = "Mission type."]
21126    #[cfg_attr(feature = "serde", serde(default))]
21127    pub mission_type: MavMissionType,
21128}
21129impl MISSION_REQUEST_INT_DATA {
21130    pub const ENCODED_LEN: usize = 5usize;
21131    pub const DEFAULT: Self = Self {
21132        seq: 0_u16,
21133        target_system: 0_u8,
21134        target_component: 0_u8,
21135        mission_type: MavMissionType::DEFAULT,
21136    };
21137    #[cfg(feature = "arbitrary")]
21138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21139        use arbitrary::{Arbitrary, Unstructured};
21140        let mut buf = [0u8; 1024];
21141        rng.fill_bytes(&mut buf);
21142        let mut unstructured = Unstructured::new(&buf);
21143        Self::arbitrary(&mut unstructured).unwrap_or_default()
21144    }
21145}
21146impl Default for MISSION_REQUEST_INT_DATA {
21147    fn default() -> Self {
21148        Self::DEFAULT.clone()
21149    }
21150}
21151impl MessageData for MISSION_REQUEST_INT_DATA {
21152    type Message = MavMessage;
21153    const ID: u32 = 51u32;
21154    const NAME: &'static str = "MISSION_REQUEST_INT";
21155    const EXTRA_CRC: u8 = 196u8;
21156    const ENCODED_LEN: usize = 5usize;
21157    fn deser(
21158        _version: MavlinkVersion,
21159        __input: &[u8],
21160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21161        let avail_len = __input.len();
21162        let mut payload_buf = [0; Self::ENCODED_LEN];
21163        let mut buf = if avail_len < Self::ENCODED_LEN {
21164            payload_buf[0..avail_len].copy_from_slice(__input);
21165            Bytes::new(&payload_buf)
21166        } else {
21167            Bytes::new(__input)
21168        };
21169        let mut __struct = Self::default();
21170        __struct.seq = buf.get_u16_le();
21171        __struct.target_system = buf.get_u8();
21172        __struct.target_component = buf.get_u8();
21173        let tmp = buf.get_u8();
21174        __struct.mission_type =
21175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21176                enum_type: "MavMissionType",
21177                value: tmp as u32,
21178            })?;
21179        Ok(__struct)
21180    }
21181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21182        let mut __tmp = BytesMut::new(bytes);
21183        #[allow(clippy::absurd_extreme_comparisons)]
21184        #[allow(unused_comparisons)]
21185        if __tmp.remaining() < Self::ENCODED_LEN {
21186            panic!(
21187                "buffer is too small (need {} bytes, but got {})",
21188                Self::ENCODED_LEN,
21189                __tmp.remaining(),
21190            )
21191        }
21192        __tmp.put_u16_le(self.seq);
21193        __tmp.put_u8(self.target_system);
21194        __tmp.put_u8(self.target_component);
21195        if matches!(version, MavlinkVersion::V2) {
21196            __tmp.put_u8(self.mission_type as u8);
21197            let len = __tmp.len();
21198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21199        } else {
21200            __tmp.len()
21201        }
21202    }
21203}
21204#[doc = "Request the overall list of mission items from the system/component."]
21205#[doc = ""]
21206#[doc = "ID: 43"]
21207#[derive(Debug, Clone, PartialEq)]
21208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21209#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21210#[cfg_attr(feature = "ts", derive(TS))]
21211#[cfg_attr(feature = "ts", ts(export))]
21212pub struct MISSION_REQUEST_LIST_DATA {
21213    #[doc = "System ID"]
21214    pub target_system: u8,
21215    #[doc = "Component ID"]
21216    pub target_component: u8,
21217    #[doc = "Mission type."]
21218    #[cfg_attr(feature = "serde", serde(default))]
21219    pub mission_type: MavMissionType,
21220}
21221impl MISSION_REQUEST_LIST_DATA {
21222    pub const ENCODED_LEN: usize = 3usize;
21223    pub const DEFAULT: Self = Self {
21224        target_system: 0_u8,
21225        target_component: 0_u8,
21226        mission_type: MavMissionType::DEFAULT,
21227    };
21228    #[cfg(feature = "arbitrary")]
21229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21230        use arbitrary::{Arbitrary, Unstructured};
21231        let mut buf = [0u8; 1024];
21232        rng.fill_bytes(&mut buf);
21233        let mut unstructured = Unstructured::new(&buf);
21234        Self::arbitrary(&mut unstructured).unwrap_or_default()
21235    }
21236}
21237impl Default for MISSION_REQUEST_LIST_DATA {
21238    fn default() -> Self {
21239        Self::DEFAULT.clone()
21240    }
21241}
21242impl MessageData for MISSION_REQUEST_LIST_DATA {
21243    type Message = MavMessage;
21244    const ID: u32 = 43u32;
21245    const NAME: &'static str = "MISSION_REQUEST_LIST";
21246    const EXTRA_CRC: u8 = 132u8;
21247    const ENCODED_LEN: usize = 3usize;
21248    fn deser(
21249        _version: MavlinkVersion,
21250        __input: &[u8],
21251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21252        let avail_len = __input.len();
21253        let mut payload_buf = [0; Self::ENCODED_LEN];
21254        let mut buf = if avail_len < Self::ENCODED_LEN {
21255            payload_buf[0..avail_len].copy_from_slice(__input);
21256            Bytes::new(&payload_buf)
21257        } else {
21258            Bytes::new(__input)
21259        };
21260        let mut __struct = Self::default();
21261        __struct.target_system = buf.get_u8();
21262        __struct.target_component = buf.get_u8();
21263        let tmp = buf.get_u8();
21264        __struct.mission_type =
21265            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21266                enum_type: "MavMissionType",
21267                value: tmp as u32,
21268            })?;
21269        Ok(__struct)
21270    }
21271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21272        let mut __tmp = BytesMut::new(bytes);
21273        #[allow(clippy::absurd_extreme_comparisons)]
21274        #[allow(unused_comparisons)]
21275        if __tmp.remaining() < Self::ENCODED_LEN {
21276            panic!(
21277                "buffer is too small (need {} bytes, but got {})",
21278                Self::ENCODED_LEN,
21279                __tmp.remaining(),
21280            )
21281        }
21282        __tmp.put_u8(self.target_system);
21283        __tmp.put_u8(self.target_component);
21284        if matches!(version, MavlinkVersion::V2) {
21285            __tmp.put_u8(self.mission_type as u8);
21286            let len = __tmp.len();
21287            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21288        } else {
21289            __tmp.len()
21290        }
21291    }
21292}
21293#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21294#[doc = ""]
21295#[doc = "ID: 37"]
21296#[derive(Debug, Clone, PartialEq)]
21297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21299#[cfg_attr(feature = "ts", derive(TS))]
21300#[cfg_attr(feature = "ts", ts(export))]
21301pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21302    #[doc = "Start index"]
21303    pub start_index: i16,
21304    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21305    pub end_index: i16,
21306    #[doc = "System ID"]
21307    pub target_system: u8,
21308    #[doc = "Component ID"]
21309    pub target_component: u8,
21310    #[doc = "Mission type."]
21311    #[cfg_attr(feature = "serde", serde(default))]
21312    pub mission_type: MavMissionType,
21313}
21314impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21315    pub const ENCODED_LEN: usize = 7usize;
21316    pub const DEFAULT: Self = Self {
21317        start_index: 0_i16,
21318        end_index: 0_i16,
21319        target_system: 0_u8,
21320        target_component: 0_u8,
21321        mission_type: MavMissionType::DEFAULT,
21322    };
21323    #[cfg(feature = "arbitrary")]
21324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21325        use arbitrary::{Arbitrary, Unstructured};
21326        let mut buf = [0u8; 1024];
21327        rng.fill_bytes(&mut buf);
21328        let mut unstructured = Unstructured::new(&buf);
21329        Self::arbitrary(&mut unstructured).unwrap_or_default()
21330    }
21331}
21332impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21333    fn default() -> Self {
21334        Self::DEFAULT.clone()
21335    }
21336}
21337impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21338    type Message = MavMessage;
21339    const ID: u32 = 37u32;
21340    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21341    const EXTRA_CRC: u8 = 212u8;
21342    const ENCODED_LEN: usize = 7usize;
21343    fn deser(
21344        _version: MavlinkVersion,
21345        __input: &[u8],
21346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21347        let avail_len = __input.len();
21348        let mut payload_buf = [0; Self::ENCODED_LEN];
21349        let mut buf = if avail_len < Self::ENCODED_LEN {
21350            payload_buf[0..avail_len].copy_from_slice(__input);
21351            Bytes::new(&payload_buf)
21352        } else {
21353            Bytes::new(__input)
21354        };
21355        let mut __struct = Self::default();
21356        __struct.start_index = buf.get_i16_le();
21357        __struct.end_index = buf.get_i16_le();
21358        __struct.target_system = buf.get_u8();
21359        __struct.target_component = buf.get_u8();
21360        let tmp = buf.get_u8();
21361        __struct.mission_type =
21362            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21363                enum_type: "MavMissionType",
21364                value: tmp as u32,
21365            })?;
21366        Ok(__struct)
21367    }
21368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21369        let mut __tmp = BytesMut::new(bytes);
21370        #[allow(clippy::absurd_extreme_comparisons)]
21371        #[allow(unused_comparisons)]
21372        if __tmp.remaining() < Self::ENCODED_LEN {
21373            panic!(
21374                "buffer is too small (need {} bytes, but got {})",
21375                Self::ENCODED_LEN,
21376                __tmp.remaining(),
21377            )
21378        }
21379        __tmp.put_i16_le(self.start_index);
21380        __tmp.put_i16_le(self.end_index);
21381        __tmp.put_u8(self.target_system);
21382        __tmp.put_u8(self.target_component);
21383        if matches!(version, MavlinkVersion::V2) {
21384            __tmp.put_u8(self.mission_type as u8);
21385            let len = __tmp.len();
21386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21387        } else {
21388            __tmp.len()
21389        }
21390    }
21391}
21392#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21393#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21394#[doc = ""]
21395#[doc = "ID: 41"]
21396#[derive(Debug, Clone, PartialEq)]
21397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21399#[cfg_attr(feature = "ts", derive(TS))]
21400#[cfg_attr(feature = "ts", ts(export))]
21401pub struct MISSION_SET_CURRENT_DATA {
21402    #[doc = "Sequence"]
21403    pub seq: u16,
21404    #[doc = "System ID"]
21405    pub target_system: u8,
21406    #[doc = "Component ID"]
21407    pub target_component: u8,
21408}
21409impl MISSION_SET_CURRENT_DATA {
21410    pub const ENCODED_LEN: usize = 4usize;
21411    pub const DEFAULT: Self = Self {
21412        seq: 0_u16,
21413        target_system: 0_u8,
21414        target_component: 0_u8,
21415    };
21416    #[cfg(feature = "arbitrary")]
21417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21418        use arbitrary::{Arbitrary, Unstructured};
21419        let mut buf = [0u8; 1024];
21420        rng.fill_bytes(&mut buf);
21421        let mut unstructured = Unstructured::new(&buf);
21422        Self::arbitrary(&mut unstructured).unwrap_or_default()
21423    }
21424}
21425impl Default for MISSION_SET_CURRENT_DATA {
21426    fn default() -> Self {
21427        Self::DEFAULT.clone()
21428    }
21429}
21430impl MessageData for MISSION_SET_CURRENT_DATA {
21431    type Message = MavMessage;
21432    const ID: u32 = 41u32;
21433    const NAME: &'static str = "MISSION_SET_CURRENT";
21434    const EXTRA_CRC: u8 = 28u8;
21435    const ENCODED_LEN: usize = 4usize;
21436    fn deser(
21437        _version: MavlinkVersion,
21438        __input: &[u8],
21439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21440        let avail_len = __input.len();
21441        let mut payload_buf = [0; Self::ENCODED_LEN];
21442        let mut buf = if avail_len < Self::ENCODED_LEN {
21443            payload_buf[0..avail_len].copy_from_slice(__input);
21444            Bytes::new(&payload_buf)
21445        } else {
21446            Bytes::new(__input)
21447        };
21448        let mut __struct = Self::default();
21449        __struct.seq = buf.get_u16_le();
21450        __struct.target_system = buf.get_u8();
21451        __struct.target_component = buf.get_u8();
21452        Ok(__struct)
21453    }
21454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21455        let mut __tmp = BytesMut::new(bytes);
21456        #[allow(clippy::absurd_extreme_comparisons)]
21457        #[allow(unused_comparisons)]
21458        if __tmp.remaining() < Self::ENCODED_LEN {
21459            panic!(
21460                "buffer is too small (need {} bytes, but got {})",
21461                Self::ENCODED_LEN,
21462                __tmp.remaining(),
21463            )
21464        }
21465        __tmp.put_u16_le(self.seq);
21466        __tmp.put_u8(self.target_system);
21467        __tmp.put_u8(self.target_component);
21468        if matches!(version, MavlinkVersion::V2) {
21469            let len = __tmp.len();
21470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21471        } else {
21472            __tmp.len()
21473        }
21474    }
21475}
21476#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21477#[doc = ""]
21478#[doc = "ID: 38"]
21479#[derive(Debug, Clone, PartialEq)]
21480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21482#[cfg_attr(feature = "ts", derive(TS))]
21483#[cfg_attr(feature = "ts", ts(export))]
21484pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21485    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21486    pub start_index: i16,
21487    #[doc = "End index, equal or greater than start index."]
21488    pub end_index: i16,
21489    #[doc = "System ID"]
21490    pub target_system: u8,
21491    #[doc = "Component ID"]
21492    pub target_component: u8,
21493    #[doc = "Mission type."]
21494    #[cfg_attr(feature = "serde", serde(default))]
21495    pub mission_type: MavMissionType,
21496}
21497impl MISSION_WRITE_PARTIAL_LIST_DATA {
21498    pub const ENCODED_LEN: usize = 7usize;
21499    pub const DEFAULT: Self = Self {
21500        start_index: 0_i16,
21501        end_index: 0_i16,
21502        target_system: 0_u8,
21503        target_component: 0_u8,
21504        mission_type: MavMissionType::DEFAULT,
21505    };
21506    #[cfg(feature = "arbitrary")]
21507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21508        use arbitrary::{Arbitrary, Unstructured};
21509        let mut buf = [0u8; 1024];
21510        rng.fill_bytes(&mut buf);
21511        let mut unstructured = Unstructured::new(&buf);
21512        Self::arbitrary(&mut unstructured).unwrap_or_default()
21513    }
21514}
21515impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21516    fn default() -> Self {
21517        Self::DEFAULT.clone()
21518    }
21519}
21520impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21521    type Message = MavMessage;
21522    const ID: u32 = 38u32;
21523    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21524    const EXTRA_CRC: u8 = 9u8;
21525    const ENCODED_LEN: usize = 7usize;
21526    fn deser(
21527        _version: MavlinkVersion,
21528        __input: &[u8],
21529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21530        let avail_len = __input.len();
21531        let mut payload_buf = [0; Self::ENCODED_LEN];
21532        let mut buf = if avail_len < Self::ENCODED_LEN {
21533            payload_buf[0..avail_len].copy_from_slice(__input);
21534            Bytes::new(&payload_buf)
21535        } else {
21536            Bytes::new(__input)
21537        };
21538        let mut __struct = Self::default();
21539        __struct.start_index = buf.get_i16_le();
21540        __struct.end_index = buf.get_i16_le();
21541        __struct.target_system = buf.get_u8();
21542        __struct.target_component = buf.get_u8();
21543        let tmp = buf.get_u8();
21544        __struct.mission_type =
21545            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21546                enum_type: "MavMissionType",
21547                value: tmp as u32,
21548            })?;
21549        Ok(__struct)
21550    }
21551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21552        let mut __tmp = BytesMut::new(bytes);
21553        #[allow(clippy::absurd_extreme_comparisons)]
21554        #[allow(unused_comparisons)]
21555        if __tmp.remaining() < Self::ENCODED_LEN {
21556            panic!(
21557                "buffer is too small (need {} bytes, but got {})",
21558                Self::ENCODED_LEN,
21559                __tmp.remaining(),
21560            )
21561        }
21562        __tmp.put_i16_le(self.start_index);
21563        __tmp.put_i16_le(self.end_index);
21564        __tmp.put_u8(self.target_system);
21565        __tmp.put_u8(self.target_component);
21566        if matches!(version, MavlinkVersion::V2) {
21567            __tmp.put_u8(self.mission_type as u8);
21568            let len = __tmp.len();
21569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21570        } else {
21571            __tmp.len()
21572        }
21573    }
21574}
21575#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21576#[doc = "Orientation of a mount."]
21577#[doc = ""]
21578#[doc = "ID: 265"]
21579#[derive(Debug, Clone, PartialEq)]
21580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21582#[cfg_attr(feature = "ts", derive(TS))]
21583#[cfg_attr(feature = "ts", ts(export))]
21584pub struct MOUNT_ORIENTATION_DATA {
21585    #[doc = "Timestamp (time since system boot)."]
21586    pub time_boot_ms: u32,
21587    #[doc = "Roll in global frame (set to NaN for invalid)."]
21588    pub roll: f32,
21589    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21590    pub pitch: f32,
21591    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21592    pub yaw: f32,
21593    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21595    pub yaw_absolute: f32,
21596}
21597impl MOUNT_ORIENTATION_DATA {
21598    pub const ENCODED_LEN: usize = 20usize;
21599    pub const DEFAULT: Self = Self {
21600        time_boot_ms: 0_u32,
21601        roll: 0.0_f32,
21602        pitch: 0.0_f32,
21603        yaw: 0.0_f32,
21604        yaw_absolute: 0.0_f32,
21605    };
21606    #[cfg(feature = "arbitrary")]
21607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21608        use arbitrary::{Arbitrary, Unstructured};
21609        let mut buf = [0u8; 1024];
21610        rng.fill_bytes(&mut buf);
21611        let mut unstructured = Unstructured::new(&buf);
21612        Self::arbitrary(&mut unstructured).unwrap_or_default()
21613    }
21614}
21615impl Default for MOUNT_ORIENTATION_DATA {
21616    fn default() -> Self {
21617        Self::DEFAULT.clone()
21618    }
21619}
21620impl MessageData for MOUNT_ORIENTATION_DATA {
21621    type Message = MavMessage;
21622    const ID: u32 = 265u32;
21623    const NAME: &'static str = "MOUNT_ORIENTATION";
21624    const EXTRA_CRC: u8 = 26u8;
21625    const ENCODED_LEN: usize = 20usize;
21626    fn deser(
21627        _version: MavlinkVersion,
21628        __input: &[u8],
21629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21630        let avail_len = __input.len();
21631        let mut payload_buf = [0; Self::ENCODED_LEN];
21632        let mut buf = if avail_len < Self::ENCODED_LEN {
21633            payload_buf[0..avail_len].copy_from_slice(__input);
21634            Bytes::new(&payload_buf)
21635        } else {
21636            Bytes::new(__input)
21637        };
21638        let mut __struct = Self::default();
21639        __struct.time_boot_ms = buf.get_u32_le();
21640        __struct.roll = buf.get_f32_le();
21641        __struct.pitch = buf.get_f32_le();
21642        __struct.yaw = buf.get_f32_le();
21643        __struct.yaw_absolute = buf.get_f32_le();
21644        Ok(__struct)
21645    }
21646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21647        let mut __tmp = BytesMut::new(bytes);
21648        #[allow(clippy::absurd_extreme_comparisons)]
21649        #[allow(unused_comparisons)]
21650        if __tmp.remaining() < Self::ENCODED_LEN {
21651            panic!(
21652                "buffer is too small (need {} bytes, but got {})",
21653                Self::ENCODED_LEN,
21654                __tmp.remaining(),
21655            )
21656        }
21657        __tmp.put_u32_le(self.time_boot_ms);
21658        __tmp.put_f32_le(self.roll);
21659        __tmp.put_f32_le(self.pitch);
21660        __tmp.put_f32_le(self.yaw);
21661        if matches!(version, MavlinkVersion::V2) {
21662            __tmp.put_f32_le(self.yaw_absolute);
21663            let len = __tmp.len();
21664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21665        } else {
21666            __tmp.len()
21667        }
21668    }
21669}
21670#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21671#[doc = ""]
21672#[doc = "ID: 251"]
21673#[derive(Debug, Clone, PartialEq)]
21674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21676#[cfg_attr(feature = "ts", derive(TS))]
21677#[cfg_attr(feature = "ts", ts(export))]
21678pub struct NAMED_VALUE_FLOAT_DATA {
21679    #[doc = "Timestamp (time since system boot)."]
21680    pub time_boot_ms: u32,
21681    #[doc = "Floating point value"]
21682    pub value: f32,
21683    #[doc = "Name of the debug variable"]
21684    #[cfg_attr(
21685        feature = "serde",
21686        serde(
21687            serialize_with = "crate::nulstr::serialize::<_, 10>",
21688            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
21689        )
21690    )]
21691    #[cfg_attr(feature = "ts", ts(type = "string"))]
21692    pub name: [u8; 10],
21693}
21694impl NAMED_VALUE_FLOAT_DATA {
21695    pub const ENCODED_LEN: usize = 18usize;
21696    pub const DEFAULT: Self = Self {
21697        time_boot_ms: 0_u32,
21698        value: 0.0_f32,
21699        name: [0_u8; 10usize],
21700    };
21701    #[cfg(feature = "arbitrary")]
21702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21703        use arbitrary::{Arbitrary, Unstructured};
21704        let mut buf = [0u8; 1024];
21705        rng.fill_bytes(&mut buf);
21706        let mut unstructured = Unstructured::new(&buf);
21707        Self::arbitrary(&mut unstructured).unwrap_or_default()
21708    }
21709}
21710impl Default for NAMED_VALUE_FLOAT_DATA {
21711    fn default() -> Self {
21712        Self::DEFAULT.clone()
21713    }
21714}
21715impl MessageData for NAMED_VALUE_FLOAT_DATA {
21716    type Message = MavMessage;
21717    const ID: u32 = 251u32;
21718    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21719    const EXTRA_CRC: u8 = 170u8;
21720    const ENCODED_LEN: usize = 18usize;
21721    fn deser(
21722        _version: MavlinkVersion,
21723        __input: &[u8],
21724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21725        let avail_len = __input.len();
21726        let mut payload_buf = [0; Self::ENCODED_LEN];
21727        let mut buf = if avail_len < Self::ENCODED_LEN {
21728            payload_buf[0..avail_len].copy_from_slice(__input);
21729            Bytes::new(&payload_buf)
21730        } else {
21731            Bytes::new(__input)
21732        };
21733        let mut __struct = Self::default();
21734        __struct.time_boot_ms = buf.get_u32_le();
21735        __struct.value = buf.get_f32_le();
21736        for v in &mut __struct.name {
21737            let val = buf.get_u8();
21738            *v = val;
21739        }
21740        Ok(__struct)
21741    }
21742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21743        let mut __tmp = BytesMut::new(bytes);
21744        #[allow(clippy::absurd_extreme_comparisons)]
21745        #[allow(unused_comparisons)]
21746        if __tmp.remaining() < Self::ENCODED_LEN {
21747            panic!(
21748                "buffer is too small (need {} bytes, but got {})",
21749                Self::ENCODED_LEN,
21750                __tmp.remaining(),
21751            )
21752        }
21753        __tmp.put_u32_le(self.time_boot_ms);
21754        __tmp.put_f32_le(self.value);
21755        for val in &self.name {
21756            __tmp.put_u8(*val);
21757        }
21758        if matches!(version, MavlinkVersion::V2) {
21759            let len = __tmp.len();
21760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21761        } else {
21762            __tmp.len()
21763        }
21764    }
21765}
21766#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21767#[doc = ""]
21768#[doc = "ID: 252"]
21769#[derive(Debug, Clone, PartialEq)]
21770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21772#[cfg_attr(feature = "ts", derive(TS))]
21773#[cfg_attr(feature = "ts", ts(export))]
21774pub struct NAMED_VALUE_INT_DATA {
21775    #[doc = "Timestamp (time since system boot)."]
21776    pub time_boot_ms: u32,
21777    #[doc = "Signed integer value"]
21778    pub value: i32,
21779    #[doc = "Name of the debug variable"]
21780    #[cfg_attr(
21781        feature = "serde",
21782        serde(
21783            serialize_with = "crate::nulstr::serialize::<_, 10>",
21784            deserialize_with = "crate::nulstr::deserialize::<_, 10>"
21785        )
21786    )]
21787    #[cfg_attr(feature = "ts", ts(type = "string"))]
21788    pub name: [u8; 10],
21789}
21790impl NAMED_VALUE_INT_DATA {
21791    pub const ENCODED_LEN: usize = 18usize;
21792    pub const DEFAULT: Self = Self {
21793        time_boot_ms: 0_u32,
21794        value: 0_i32,
21795        name: [0_u8; 10usize],
21796    };
21797    #[cfg(feature = "arbitrary")]
21798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21799        use arbitrary::{Arbitrary, Unstructured};
21800        let mut buf = [0u8; 1024];
21801        rng.fill_bytes(&mut buf);
21802        let mut unstructured = Unstructured::new(&buf);
21803        Self::arbitrary(&mut unstructured).unwrap_or_default()
21804    }
21805}
21806impl Default for NAMED_VALUE_INT_DATA {
21807    fn default() -> Self {
21808        Self::DEFAULT.clone()
21809    }
21810}
21811impl MessageData for NAMED_VALUE_INT_DATA {
21812    type Message = MavMessage;
21813    const ID: u32 = 252u32;
21814    const NAME: &'static str = "NAMED_VALUE_INT";
21815    const EXTRA_CRC: u8 = 44u8;
21816    const ENCODED_LEN: usize = 18usize;
21817    fn deser(
21818        _version: MavlinkVersion,
21819        __input: &[u8],
21820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21821        let avail_len = __input.len();
21822        let mut payload_buf = [0; Self::ENCODED_LEN];
21823        let mut buf = if avail_len < Self::ENCODED_LEN {
21824            payload_buf[0..avail_len].copy_from_slice(__input);
21825            Bytes::new(&payload_buf)
21826        } else {
21827            Bytes::new(__input)
21828        };
21829        let mut __struct = Self::default();
21830        __struct.time_boot_ms = buf.get_u32_le();
21831        __struct.value = buf.get_i32_le();
21832        for v in &mut __struct.name {
21833            let val = buf.get_u8();
21834            *v = val;
21835        }
21836        Ok(__struct)
21837    }
21838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21839        let mut __tmp = BytesMut::new(bytes);
21840        #[allow(clippy::absurd_extreme_comparisons)]
21841        #[allow(unused_comparisons)]
21842        if __tmp.remaining() < Self::ENCODED_LEN {
21843            panic!(
21844                "buffer is too small (need {} bytes, but got {})",
21845                Self::ENCODED_LEN,
21846                __tmp.remaining(),
21847            )
21848        }
21849        __tmp.put_u32_le(self.time_boot_ms);
21850        __tmp.put_i32_le(self.value);
21851        for val in &self.name {
21852            __tmp.put_u8(*val);
21853        }
21854        if matches!(version, MavlinkVersion::V2) {
21855            let len = __tmp.len();
21856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21857        } else {
21858            __tmp.len()
21859        }
21860    }
21861}
21862#[doc = "The state of the navigation and position controller."]
21863#[doc = ""]
21864#[doc = "ID: 62"]
21865#[derive(Debug, Clone, PartialEq)]
21866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21868#[cfg_attr(feature = "ts", derive(TS))]
21869#[cfg_attr(feature = "ts", ts(export))]
21870pub struct NAV_CONTROLLER_OUTPUT_DATA {
21871    #[doc = "Current desired roll"]
21872    pub nav_roll: f32,
21873    #[doc = "Current desired pitch"]
21874    pub nav_pitch: f32,
21875    #[doc = "Current altitude error"]
21876    pub alt_error: f32,
21877    #[doc = "Current airspeed error"]
21878    pub aspd_error: f32,
21879    #[doc = "Current crosstrack error on x-y plane"]
21880    pub xtrack_error: f32,
21881    #[doc = "Current desired heading"]
21882    pub nav_bearing: i16,
21883    #[doc = "Bearing to current waypoint/target"]
21884    pub target_bearing: i16,
21885    #[doc = "Distance to active waypoint"]
21886    pub wp_dist: u16,
21887}
21888impl NAV_CONTROLLER_OUTPUT_DATA {
21889    pub const ENCODED_LEN: usize = 26usize;
21890    pub const DEFAULT: Self = Self {
21891        nav_roll: 0.0_f32,
21892        nav_pitch: 0.0_f32,
21893        alt_error: 0.0_f32,
21894        aspd_error: 0.0_f32,
21895        xtrack_error: 0.0_f32,
21896        nav_bearing: 0_i16,
21897        target_bearing: 0_i16,
21898        wp_dist: 0_u16,
21899    };
21900    #[cfg(feature = "arbitrary")]
21901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21902        use arbitrary::{Arbitrary, Unstructured};
21903        let mut buf = [0u8; 1024];
21904        rng.fill_bytes(&mut buf);
21905        let mut unstructured = Unstructured::new(&buf);
21906        Self::arbitrary(&mut unstructured).unwrap_or_default()
21907    }
21908}
21909impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21910    fn default() -> Self {
21911        Self::DEFAULT.clone()
21912    }
21913}
21914impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21915    type Message = MavMessage;
21916    const ID: u32 = 62u32;
21917    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21918    const EXTRA_CRC: u8 = 183u8;
21919    const ENCODED_LEN: usize = 26usize;
21920    fn deser(
21921        _version: MavlinkVersion,
21922        __input: &[u8],
21923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21924        let avail_len = __input.len();
21925        let mut payload_buf = [0; Self::ENCODED_LEN];
21926        let mut buf = if avail_len < Self::ENCODED_LEN {
21927            payload_buf[0..avail_len].copy_from_slice(__input);
21928            Bytes::new(&payload_buf)
21929        } else {
21930            Bytes::new(__input)
21931        };
21932        let mut __struct = Self::default();
21933        __struct.nav_roll = buf.get_f32_le();
21934        __struct.nav_pitch = buf.get_f32_le();
21935        __struct.alt_error = buf.get_f32_le();
21936        __struct.aspd_error = buf.get_f32_le();
21937        __struct.xtrack_error = buf.get_f32_le();
21938        __struct.nav_bearing = buf.get_i16_le();
21939        __struct.target_bearing = buf.get_i16_le();
21940        __struct.wp_dist = buf.get_u16_le();
21941        Ok(__struct)
21942    }
21943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21944        let mut __tmp = BytesMut::new(bytes);
21945        #[allow(clippy::absurd_extreme_comparisons)]
21946        #[allow(unused_comparisons)]
21947        if __tmp.remaining() < Self::ENCODED_LEN {
21948            panic!(
21949                "buffer is too small (need {} bytes, but got {})",
21950                Self::ENCODED_LEN,
21951                __tmp.remaining(),
21952            )
21953        }
21954        __tmp.put_f32_le(self.nav_roll);
21955        __tmp.put_f32_le(self.nav_pitch);
21956        __tmp.put_f32_le(self.alt_error);
21957        __tmp.put_f32_le(self.aspd_error);
21958        __tmp.put_f32_le(self.xtrack_error);
21959        __tmp.put_i16_le(self.nav_bearing);
21960        __tmp.put_i16_le(self.target_bearing);
21961        __tmp.put_u16_le(self.wp_dist);
21962        if matches!(version, MavlinkVersion::V2) {
21963            let len = __tmp.len();
21964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21965        } else {
21966            __tmp.len()
21967        }
21968    }
21969}
21970#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21971#[doc = ""]
21972#[doc = "ID: 330"]
21973#[derive(Debug, Clone, PartialEq)]
21974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21976#[cfg_attr(feature = "ts", derive(TS))]
21977#[cfg_attr(feature = "ts", ts(export))]
21978pub struct OBSTACLE_DISTANCE_DATA {
21979    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21980    pub time_usec: u64,
21981    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21983    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21984    pub distances: [u16; 72],
21985    #[doc = "Minimum distance the sensor can measure."]
21986    pub min_distance: u16,
21987    #[doc = "Maximum distance the sensor can measure."]
21988    pub max_distance: u16,
21989    #[doc = "Class id of the distance sensor type."]
21990    pub sensor_type: MavDistanceSensor,
21991    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21992    pub increment: u8,
21993    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21995    pub increment_f: f32,
21996    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21997    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21998    pub angle_offset: f32,
21999    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
22000    #[cfg_attr(feature = "serde", serde(default))]
22001    pub frame: MavFrame,
22002}
22003impl OBSTACLE_DISTANCE_DATA {
22004    pub const ENCODED_LEN: usize = 167usize;
22005    pub const DEFAULT: Self = Self {
22006        time_usec: 0_u64,
22007        distances: [0_u16; 72usize],
22008        min_distance: 0_u16,
22009        max_distance: 0_u16,
22010        sensor_type: MavDistanceSensor::DEFAULT,
22011        increment: 0_u8,
22012        increment_f: 0.0_f32,
22013        angle_offset: 0.0_f32,
22014        frame: MavFrame::DEFAULT,
22015    };
22016    #[cfg(feature = "arbitrary")]
22017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22018        use arbitrary::{Arbitrary, Unstructured};
22019        let mut buf = [0u8; 1024];
22020        rng.fill_bytes(&mut buf);
22021        let mut unstructured = Unstructured::new(&buf);
22022        Self::arbitrary(&mut unstructured).unwrap_or_default()
22023    }
22024}
22025impl Default for OBSTACLE_DISTANCE_DATA {
22026    fn default() -> Self {
22027        Self::DEFAULT.clone()
22028    }
22029}
22030impl MessageData for OBSTACLE_DISTANCE_DATA {
22031    type Message = MavMessage;
22032    const ID: u32 = 330u32;
22033    const NAME: &'static str = "OBSTACLE_DISTANCE";
22034    const EXTRA_CRC: u8 = 23u8;
22035    const ENCODED_LEN: usize = 167usize;
22036    fn deser(
22037        _version: MavlinkVersion,
22038        __input: &[u8],
22039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22040        let avail_len = __input.len();
22041        let mut payload_buf = [0; Self::ENCODED_LEN];
22042        let mut buf = if avail_len < Self::ENCODED_LEN {
22043            payload_buf[0..avail_len].copy_from_slice(__input);
22044            Bytes::new(&payload_buf)
22045        } else {
22046            Bytes::new(__input)
22047        };
22048        let mut __struct = Self::default();
22049        __struct.time_usec = buf.get_u64_le();
22050        for v in &mut __struct.distances {
22051            let val = buf.get_u16_le();
22052            *v = val;
22053        }
22054        __struct.min_distance = buf.get_u16_le();
22055        __struct.max_distance = buf.get_u16_le();
22056        let tmp = buf.get_u8();
22057        __struct.sensor_type =
22058            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22059                enum_type: "MavDistanceSensor",
22060                value: tmp as u32,
22061            })?;
22062        __struct.increment = buf.get_u8();
22063        __struct.increment_f = buf.get_f32_le();
22064        __struct.angle_offset = buf.get_f32_le();
22065        let tmp = buf.get_u8();
22066        __struct.frame =
22067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22068                enum_type: "MavFrame",
22069                value: tmp as u32,
22070            })?;
22071        Ok(__struct)
22072    }
22073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22074        let mut __tmp = BytesMut::new(bytes);
22075        #[allow(clippy::absurd_extreme_comparisons)]
22076        #[allow(unused_comparisons)]
22077        if __tmp.remaining() < Self::ENCODED_LEN {
22078            panic!(
22079                "buffer is too small (need {} bytes, but got {})",
22080                Self::ENCODED_LEN,
22081                __tmp.remaining(),
22082            )
22083        }
22084        __tmp.put_u64_le(self.time_usec);
22085        for val in &self.distances {
22086            __tmp.put_u16_le(*val);
22087        }
22088        __tmp.put_u16_le(self.min_distance);
22089        __tmp.put_u16_le(self.max_distance);
22090        __tmp.put_u8(self.sensor_type as u8);
22091        __tmp.put_u8(self.increment);
22092        if matches!(version, MavlinkVersion::V2) {
22093            __tmp.put_f32_le(self.increment_f);
22094            __tmp.put_f32_le(self.angle_offset);
22095            __tmp.put_u8(self.frame as u8);
22096            let len = __tmp.len();
22097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22098        } else {
22099            __tmp.len()
22100        }
22101    }
22102}
22103#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
22104#[doc = ""]
22105#[doc = "ID: 331"]
22106#[derive(Debug, Clone, PartialEq)]
22107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22109#[cfg_attr(feature = "ts", derive(TS))]
22110#[cfg_attr(feature = "ts", ts(export))]
22111pub struct ODOMETRY_DATA {
22112    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22113    pub time_usec: u64,
22114    #[doc = "X Position"]
22115    pub x: f32,
22116    #[doc = "Y Position"]
22117    pub y: f32,
22118    #[doc = "Z Position"]
22119    pub z: f32,
22120    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22123    pub q: [f32; 4],
22124    #[doc = "X linear speed"]
22125    pub vx: f32,
22126    #[doc = "Y linear speed"]
22127    pub vy: f32,
22128    #[doc = "Z linear speed"]
22129    pub vz: f32,
22130    #[doc = "Roll angular speed"]
22131    pub rollspeed: f32,
22132    #[doc = "Pitch angular speed"]
22133    pub pitchspeed: f32,
22134    #[doc = "Yaw angular speed"]
22135    pub yawspeed: f32,
22136    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22139    pub pose_covariance: [f32; 21],
22140    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22143    pub velocity_covariance: [f32; 21],
22144    #[doc = "Coordinate frame of reference for the pose data."]
22145    pub frame_id: MavFrame,
22146    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22147    pub child_frame_id: MavFrame,
22148    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22150    pub reset_counter: u8,
22151    #[doc = "Type of estimator that is providing the odometry."]
22152    #[cfg_attr(feature = "serde", serde(default))]
22153    pub estimator_type: MavEstimatorType,
22154    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22155    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22156    pub quality: i8,
22157}
22158impl ODOMETRY_DATA {
22159    pub const ENCODED_LEN: usize = 233usize;
22160    pub const DEFAULT: Self = Self {
22161        time_usec: 0_u64,
22162        x: 0.0_f32,
22163        y: 0.0_f32,
22164        z: 0.0_f32,
22165        q: [0.0_f32; 4usize],
22166        vx: 0.0_f32,
22167        vy: 0.0_f32,
22168        vz: 0.0_f32,
22169        rollspeed: 0.0_f32,
22170        pitchspeed: 0.0_f32,
22171        yawspeed: 0.0_f32,
22172        pose_covariance: [0.0_f32; 21usize],
22173        velocity_covariance: [0.0_f32; 21usize],
22174        frame_id: MavFrame::DEFAULT,
22175        child_frame_id: MavFrame::DEFAULT,
22176        reset_counter: 0_u8,
22177        estimator_type: MavEstimatorType::DEFAULT,
22178        quality: 0_i8,
22179    };
22180    #[cfg(feature = "arbitrary")]
22181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22182        use arbitrary::{Arbitrary, Unstructured};
22183        let mut buf = [0u8; 1024];
22184        rng.fill_bytes(&mut buf);
22185        let mut unstructured = Unstructured::new(&buf);
22186        Self::arbitrary(&mut unstructured).unwrap_or_default()
22187    }
22188}
22189impl Default for ODOMETRY_DATA {
22190    fn default() -> Self {
22191        Self::DEFAULT.clone()
22192    }
22193}
22194impl MessageData for ODOMETRY_DATA {
22195    type Message = MavMessage;
22196    const ID: u32 = 331u32;
22197    const NAME: &'static str = "ODOMETRY";
22198    const EXTRA_CRC: u8 = 91u8;
22199    const ENCODED_LEN: usize = 233usize;
22200    fn deser(
22201        _version: MavlinkVersion,
22202        __input: &[u8],
22203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22204        let avail_len = __input.len();
22205        let mut payload_buf = [0; Self::ENCODED_LEN];
22206        let mut buf = if avail_len < Self::ENCODED_LEN {
22207            payload_buf[0..avail_len].copy_from_slice(__input);
22208            Bytes::new(&payload_buf)
22209        } else {
22210            Bytes::new(__input)
22211        };
22212        let mut __struct = Self::default();
22213        __struct.time_usec = buf.get_u64_le();
22214        __struct.x = buf.get_f32_le();
22215        __struct.y = buf.get_f32_le();
22216        __struct.z = buf.get_f32_le();
22217        for v in &mut __struct.q {
22218            let val = buf.get_f32_le();
22219            *v = val;
22220        }
22221        __struct.vx = buf.get_f32_le();
22222        __struct.vy = buf.get_f32_le();
22223        __struct.vz = buf.get_f32_le();
22224        __struct.rollspeed = buf.get_f32_le();
22225        __struct.pitchspeed = buf.get_f32_le();
22226        __struct.yawspeed = buf.get_f32_le();
22227        for v in &mut __struct.pose_covariance {
22228            let val = buf.get_f32_le();
22229            *v = val;
22230        }
22231        for v in &mut __struct.velocity_covariance {
22232            let val = buf.get_f32_le();
22233            *v = val;
22234        }
22235        let tmp = buf.get_u8();
22236        __struct.frame_id =
22237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22238                enum_type: "MavFrame",
22239                value: tmp as u32,
22240            })?;
22241        let tmp = buf.get_u8();
22242        __struct.child_frame_id =
22243            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22244                enum_type: "MavFrame",
22245                value: tmp as u32,
22246            })?;
22247        __struct.reset_counter = buf.get_u8();
22248        let tmp = buf.get_u8();
22249        __struct.estimator_type =
22250            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22251                enum_type: "MavEstimatorType",
22252                value: tmp as u32,
22253            })?;
22254        __struct.quality = buf.get_i8();
22255        Ok(__struct)
22256    }
22257    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22258        let mut __tmp = BytesMut::new(bytes);
22259        #[allow(clippy::absurd_extreme_comparisons)]
22260        #[allow(unused_comparisons)]
22261        if __tmp.remaining() < Self::ENCODED_LEN {
22262            panic!(
22263                "buffer is too small (need {} bytes, but got {})",
22264                Self::ENCODED_LEN,
22265                __tmp.remaining(),
22266            )
22267        }
22268        __tmp.put_u64_le(self.time_usec);
22269        __tmp.put_f32_le(self.x);
22270        __tmp.put_f32_le(self.y);
22271        __tmp.put_f32_le(self.z);
22272        for val in &self.q {
22273            __tmp.put_f32_le(*val);
22274        }
22275        __tmp.put_f32_le(self.vx);
22276        __tmp.put_f32_le(self.vy);
22277        __tmp.put_f32_le(self.vz);
22278        __tmp.put_f32_le(self.rollspeed);
22279        __tmp.put_f32_le(self.pitchspeed);
22280        __tmp.put_f32_le(self.yawspeed);
22281        for val in &self.pose_covariance {
22282            __tmp.put_f32_le(*val);
22283        }
22284        for val in &self.velocity_covariance {
22285            __tmp.put_f32_le(*val);
22286        }
22287        __tmp.put_u8(self.frame_id as u8);
22288        __tmp.put_u8(self.child_frame_id as u8);
22289        if matches!(version, MavlinkVersion::V2) {
22290            __tmp.put_u8(self.reset_counter);
22291            __tmp.put_u8(self.estimator_type as u8);
22292            __tmp.put_i8(self.quality);
22293            let len = __tmp.len();
22294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22295        } else {
22296            __tmp.len()
22297        }
22298    }
22299}
22300#[doc = "Hardware status sent by an onboard computer."]
22301#[doc = ""]
22302#[doc = "ID: 390"]
22303#[derive(Debug, Clone, PartialEq)]
22304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22306#[cfg_attr(feature = "ts", derive(TS))]
22307#[cfg_attr(feature = "ts", ts(export))]
22308pub struct ONBOARD_COMPUTER_STATUS_DATA {
22309    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22310    pub time_usec: u64,
22311    #[doc = "Time since system boot."]
22312    pub uptime: u32,
22313    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22314    pub ram_usage: u32,
22315    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22316    pub ram_total: u32,
22317    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22319    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22320    pub storage_type: [u32; 4],
22321    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22324    pub storage_usage: [u32; 4],
22325    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22327    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22328    pub storage_total: [u32; 4],
22329    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22330    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22331    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22332    pub link_type: [u32; 6],
22333    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22335    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22336    pub link_tx_rate: [u32; 6],
22337    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22340    pub link_rx_rate: [u32; 6],
22341    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22343    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22344    pub link_tx_max: [u32; 6],
22345    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22347    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22348    pub link_rx_max: [u32; 6],
22349    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22351    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22352    pub fan_speed: [i16; 4],
22353    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22354    pub mavtype: u8,
22355    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22357    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22358    pub cpu_cores: [u8; 8],
22359    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22360    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22361    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22362    pub cpu_combined: [u8; 10],
22363    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22364    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22365    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22366    pub gpu_cores: [u8; 4],
22367    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22370    pub gpu_combined: [u8; 10],
22371    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22372    pub temperature_board: i8,
22373    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22375    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22376    pub temperature_core: [i8; 8],
22377}
22378impl ONBOARD_COMPUTER_STATUS_DATA {
22379    pub const ENCODED_LEN: usize = 238usize;
22380    pub const DEFAULT: Self = Self {
22381        time_usec: 0_u64,
22382        uptime: 0_u32,
22383        ram_usage: 0_u32,
22384        ram_total: 0_u32,
22385        storage_type: [0_u32; 4usize],
22386        storage_usage: [0_u32; 4usize],
22387        storage_total: [0_u32; 4usize],
22388        link_type: [0_u32; 6usize],
22389        link_tx_rate: [0_u32; 6usize],
22390        link_rx_rate: [0_u32; 6usize],
22391        link_tx_max: [0_u32; 6usize],
22392        link_rx_max: [0_u32; 6usize],
22393        fan_speed: [0_i16; 4usize],
22394        mavtype: 0_u8,
22395        cpu_cores: [0_u8; 8usize],
22396        cpu_combined: [0_u8; 10usize],
22397        gpu_cores: [0_u8; 4usize],
22398        gpu_combined: [0_u8; 10usize],
22399        temperature_board: 0_i8,
22400        temperature_core: [0_i8; 8usize],
22401    };
22402    #[cfg(feature = "arbitrary")]
22403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22404        use arbitrary::{Arbitrary, Unstructured};
22405        let mut buf = [0u8; 1024];
22406        rng.fill_bytes(&mut buf);
22407        let mut unstructured = Unstructured::new(&buf);
22408        Self::arbitrary(&mut unstructured).unwrap_or_default()
22409    }
22410}
22411impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22412    fn default() -> Self {
22413        Self::DEFAULT.clone()
22414    }
22415}
22416impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22417    type Message = MavMessage;
22418    const ID: u32 = 390u32;
22419    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22420    const EXTRA_CRC: u8 = 156u8;
22421    const ENCODED_LEN: usize = 238usize;
22422    fn deser(
22423        _version: MavlinkVersion,
22424        __input: &[u8],
22425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22426        let avail_len = __input.len();
22427        let mut payload_buf = [0; Self::ENCODED_LEN];
22428        let mut buf = if avail_len < Self::ENCODED_LEN {
22429            payload_buf[0..avail_len].copy_from_slice(__input);
22430            Bytes::new(&payload_buf)
22431        } else {
22432            Bytes::new(__input)
22433        };
22434        let mut __struct = Self::default();
22435        __struct.time_usec = buf.get_u64_le();
22436        __struct.uptime = buf.get_u32_le();
22437        __struct.ram_usage = buf.get_u32_le();
22438        __struct.ram_total = buf.get_u32_le();
22439        for v in &mut __struct.storage_type {
22440            let val = buf.get_u32_le();
22441            *v = val;
22442        }
22443        for v in &mut __struct.storage_usage {
22444            let val = buf.get_u32_le();
22445            *v = val;
22446        }
22447        for v in &mut __struct.storage_total {
22448            let val = buf.get_u32_le();
22449            *v = val;
22450        }
22451        for v in &mut __struct.link_type {
22452            let val = buf.get_u32_le();
22453            *v = val;
22454        }
22455        for v in &mut __struct.link_tx_rate {
22456            let val = buf.get_u32_le();
22457            *v = val;
22458        }
22459        for v in &mut __struct.link_rx_rate {
22460            let val = buf.get_u32_le();
22461            *v = val;
22462        }
22463        for v in &mut __struct.link_tx_max {
22464            let val = buf.get_u32_le();
22465            *v = val;
22466        }
22467        for v in &mut __struct.link_rx_max {
22468            let val = buf.get_u32_le();
22469            *v = val;
22470        }
22471        for v in &mut __struct.fan_speed {
22472            let val = buf.get_i16_le();
22473            *v = val;
22474        }
22475        __struct.mavtype = buf.get_u8();
22476        for v in &mut __struct.cpu_cores {
22477            let val = buf.get_u8();
22478            *v = val;
22479        }
22480        for v in &mut __struct.cpu_combined {
22481            let val = buf.get_u8();
22482            *v = val;
22483        }
22484        for v in &mut __struct.gpu_cores {
22485            let val = buf.get_u8();
22486            *v = val;
22487        }
22488        for v in &mut __struct.gpu_combined {
22489            let val = buf.get_u8();
22490            *v = val;
22491        }
22492        __struct.temperature_board = buf.get_i8();
22493        for v in &mut __struct.temperature_core {
22494            let val = buf.get_i8();
22495            *v = val;
22496        }
22497        Ok(__struct)
22498    }
22499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22500        let mut __tmp = BytesMut::new(bytes);
22501        #[allow(clippy::absurd_extreme_comparisons)]
22502        #[allow(unused_comparisons)]
22503        if __tmp.remaining() < Self::ENCODED_LEN {
22504            panic!(
22505                "buffer is too small (need {} bytes, but got {})",
22506                Self::ENCODED_LEN,
22507                __tmp.remaining(),
22508            )
22509        }
22510        __tmp.put_u64_le(self.time_usec);
22511        __tmp.put_u32_le(self.uptime);
22512        __tmp.put_u32_le(self.ram_usage);
22513        __tmp.put_u32_le(self.ram_total);
22514        for val in &self.storage_type {
22515            __tmp.put_u32_le(*val);
22516        }
22517        for val in &self.storage_usage {
22518            __tmp.put_u32_le(*val);
22519        }
22520        for val in &self.storage_total {
22521            __tmp.put_u32_le(*val);
22522        }
22523        for val in &self.link_type {
22524            __tmp.put_u32_le(*val);
22525        }
22526        for val in &self.link_tx_rate {
22527            __tmp.put_u32_le(*val);
22528        }
22529        for val in &self.link_rx_rate {
22530            __tmp.put_u32_le(*val);
22531        }
22532        for val in &self.link_tx_max {
22533            __tmp.put_u32_le(*val);
22534        }
22535        for val in &self.link_rx_max {
22536            __tmp.put_u32_le(*val);
22537        }
22538        for val in &self.fan_speed {
22539            __tmp.put_i16_le(*val);
22540        }
22541        __tmp.put_u8(self.mavtype);
22542        for val in &self.cpu_cores {
22543            __tmp.put_u8(*val);
22544        }
22545        for val in &self.cpu_combined {
22546            __tmp.put_u8(*val);
22547        }
22548        for val in &self.gpu_cores {
22549            __tmp.put_u8(*val);
22550        }
22551        for val in &self.gpu_combined {
22552            __tmp.put_u8(*val);
22553        }
22554        __tmp.put_i8(self.temperature_board);
22555        for val in &self.temperature_core {
22556            __tmp.put_i8(*val);
22557        }
22558        if matches!(version, MavlinkVersion::V2) {
22559            let len = __tmp.len();
22560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22561        } else {
22562            __tmp.len()
22563        }
22564    }
22565}
22566#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22567#[doc = ""]
22568#[doc = "ID: 12918"]
22569#[derive(Debug, Clone, PartialEq)]
22570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22572#[cfg_attr(feature = "ts", derive(TS))]
22573#[cfg_attr(feature = "ts", ts(export))]
22574pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22575    #[doc = "Status level indicating if arming is allowed."]
22576    pub status: MavOdidArmStatus,
22577    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22578    #[cfg_attr(
22579        feature = "serde",
22580        serde(
22581            serialize_with = "crate::nulstr::serialize::<_, 50>",
22582            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
22583        )
22584    )]
22585    #[cfg_attr(feature = "ts", ts(type = "string"))]
22586    pub error: [u8; 50],
22587}
22588impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22589    pub const ENCODED_LEN: usize = 51usize;
22590    pub const DEFAULT: Self = Self {
22591        status: MavOdidArmStatus::DEFAULT,
22592        error: [0_u8; 50usize],
22593    };
22594    #[cfg(feature = "arbitrary")]
22595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22596        use arbitrary::{Arbitrary, Unstructured};
22597        let mut buf = [0u8; 1024];
22598        rng.fill_bytes(&mut buf);
22599        let mut unstructured = Unstructured::new(&buf);
22600        Self::arbitrary(&mut unstructured).unwrap_or_default()
22601    }
22602}
22603impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22604    fn default() -> Self {
22605        Self::DEFAULT.clone()
22606    }
22607}
22608impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22609    type Message = MavMessage;
22610    const ID: u32 = 12918u32;
22611    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22612    const EXTRA_CRC: u8 = 139u8;
22613    const ENCODED_LEN: usize = 51usize;
22614    fn deser(
22615        _version: MavlinkVersion,
22616        __input: &[u8],
22617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22618        let avail_len = __input.len();
22619        let mut payload_buf = [0; Self::ENCODED_LEN];
22620        let mut buf = if avail_len < Self::ENCODED_LEN {
22621            payload_buf[0..avail_len].copy_from_slice(__input);
22622            Bytes::new(&payload_buf)
22623        } else {
22624            Bytes::new(__input)
22625        };
22626        let mut __struct = Self::default();
22627        let tmp = buf.get_u8();
22628        __struct.status =
22629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22630                enum_type: "MavOdidArmStatus",
22631                value: tmp as u32,
22632            })?;
22633        for v in &mut __struct.error {
22634            let val = buf.get_u8();
22635            *v = val;
22636        }
22637        Ok(__struct)
22638    }
22639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22640        let mut __tmp = BytesMut::new(bytes);
22641        #[allow(clippy::absurd_extreme_comparisons)]
22642        #[allow(unused_comparisons)]
22643        if __tmp.remaining() < Self::ENCODED_LEN {
22644            panic!(
22645                "buffer is too small (need {} bytes, but got {})",
22646                Self::ENCODED_LEN,
22647                __tmp.remaining(),
22648            )
22649        }
22650        __tmp.put_u8(self.status as u8);
22651        for val in &self.error {
22652            __tmp.put_u8(*val);
22653        }
22654        if matches!(version, MavlinkVersion::V2) {
22655            let len = __tmp.len();
22656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22657        } else {
22658            __tmp.len()
22659        }
22660    }
22661}
22662#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22663#[doc = ""]
22664#[doc = "ID: 12902"]
22665#[derive(Debug, Clone, PartialEq)]
22666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22668#[cfg_attr(feature = "ts", derive(TS))]
22669#[cfg_attr(feature = "ts", ts(export))]
22670pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22671    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22672    pub timestamp: u32,
22673    #[doc = "System ID (0 for broadcast)."]
22674    pub target_system: u8,
22675    #[doc = "Component ID (0 for broadcast)."]
22676    pub target_component: u8,
22677    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22680    pub id_or_mac: [u8; 20],
22681    #[doc = "Indicates the type of authentication."]
22682    pub authentication_type: MavOdidAuthType,
22683    #[doc = "Allowed range is 0 - 15."]
22684    pub data_page: u8,
22685    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22686    pub last_page_index: u8,
22687    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22688    pub length: u8,
22689    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22692    pub authentication_data: [u8; 23],
22693}
22694impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22695    pub const ENCODED_LEN: usize = 53usize;
22696    pub const DEFAULT: Self = Self {
22697        timestamp: 0_u32,
22698        target_system: 0_u8,
22699        target_component: 0_u8,
22700        id_or_mac: [0_u8; 20usize],
22701        authentication_type: MavOdidAuthType::DEFAULT,
22702        data_page: 0_u8,
22703        last_page_index: 0_u8,
22704        length: 0_u8,
22705        authentication_data: [0_u8; 23usize],
22706    };
22707    #[cfg(feature = "arbitrary")]
22708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22709        use arbitrary::{Arbitrary, Unstructured};
22710        let mut buf = [0u8; 1024];
22711        rng.fill_bytes(&mut buf);
22712        let mut unstructured = Unstructured::new(&buf);
22713        Self::arbitrary(&mut unstructured).unwrap_or_default()
22714    }
22715}
22716impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22717    fn default() -> Self {
22718        Self::DEFAULT.clone()
22719    }
22720}
22721impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22722    type Message = MavMessage;
22723    const ID: u32 = 12902u32;
22724    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22725    const EXTRA_CRC: u8 = 140u8;
22726    const ENCODED_LEN: usize = 53usize;
22727    fn deser(
22728        _version: MavlinkVersion,
22729        __input: &[u8],
22730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22731        let avail_len = __input.len();
22732        let mut payload_buf = [0; Self::ENCODED_LEN];
22733        let mut buf = if avail_len < Self::ENCODED_LEN {
22734            payload_buf[0..avail_len].copy_from_slice(__input);
22735            Bytes::new(&payload_buf)
22736        } else {
22737            Bytes::new(__input)
22738        };
22739        let mut __struct = Self::default();
22740        __struct.timestamp = buf.get_u32_le();
22741        __struct.target_system = buf.get_u8();
22742        __struct.target_component = buf.get_u8();
22743        for v in &mut __struct.id_or_mac {
22744            let val = buf.get_u8();
22745            *v = val;
22746        }
22747        let tmp = buf.get_u8();
22748        __struct.authentication_type =
22749            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22750                enum_type: "MavOdidAuthType",
22751                value: tmp as u32,
22752            })?;
22753        __struct.data_page = buf.get_u8();
22754        __struct.last_page_index = buf.get_u8();
22755        __struct.length = buf.get_u8();
22756        for v in &mut __struct.authentication_data {
22757            let val = buf.get_u8();
22758            *v = val;
22759        }
22760        Ok(__struct)
22761    }
22762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22763        let mut __tmp = BytesMut::new(bytes);
22764        #[allow(clippy::absurd_extreme_comparisons)]
22765        #[allow(unused_comparisons)]
22766        if __tmp.remaining() < Self::ENCODED_LEN {
22767            panic!(
22768                "buffer is too small (need {} bytes, but got {})",
22769                Self::ENCODED_LEN,
22770                __tmp.remaining(),
22771            )
22772        }
22773        __tmp.put_u32_le(self.timestamp);
22774        __tmp.put_u8(self.target_system);
22775        __tmp.put_u8(self.target_component);
22776        for val in &self.id_or_mac {
22777            __tmp.put_u8(*val);
22778        }
22779        __tmp.put_u8(self.authentication_type as u8);
22780        __tmp.put_u8(self.data_page);
22781        __tmp.put_u8(self.last_page_index);
22782        __tmp.put_u8(self.length);
22783        for val in &self.authentication_data {
22784            __tmp.put_u8(*val);
22785        }
22786        if matches!(version, MavlinkVersion::V2) {
22787            let len = __tmp.len();
22788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22789        } else {
22790            __tmp.len()
22791        }
22792    }
22793}
22794#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22795#[doc = ""]
22796#[doc = "ID: 12900"]
22797#[derive(Debug, Clone, PartialEq)]
22798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22800#[cfg_attr(feature = "ts", derive(TS))]
22801#[cfg_attr(feature = "ts", ts(export))]
22802pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22803    #[doc = "System ID (0 for broadcast)."]
22804    pub target_system: u8,
22805    #[doc = "Component ID (0 for broadcast)."]
22806    pub target_component: u8,
22807    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22808    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22809    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22810    pub id_or_mac: [u8; 20],
22811    #[doc = "Indicates the format for the uas_id field of this message."]
22812    pub id_type: MavOdidIdType,
22813    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22814    pub ua_type: MavOdidUaType,
22815    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22816    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22817    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22818    pub uas_id: [u8; 20],
22819}
22820impl OPEN_DRONE_ID_BASIC_ID_DATA {
22821    pub const ENCODED_LEN: usize = 44usize;
22822    pub const DEFAULT: Self = Self {
22823        target_system: 0_u8,
22824        target_component: 0_u8,
22825        id_or_mac: [0_u8; 20usize],
22826        id_type: MavOdidIdType::DEFAULT,
22827        ua_type: MavOdidUaType::DEFAULT,
22828        uas_id: [0_u8; 20usize],
22829    };
22830    #[cfg(feature = "arbitrary")]
22831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22832        use arbitrary::{Arbitrary, Unstructured};
22833        let mut buf = [0u8; 1024];
22834        rng.fill_bytes(&mut buf);
22835        let mut unstructured = Unstructured::new(&buf);
22836        Self::arbitrary(&mut unstructured).unwrap_or_default()
22837    }
22838}
22839impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22840    fn default() -> Self {
22841        Self::DEFAULT.clone()
22842    }
22843}
22844impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22845    type Message = MavMessage;
22846    const ID: u32 = 12900u32;
22847    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22848    const EXTRA_CRC: u8 = 114u8;
22849    const ENCODED_LEN: usize = 44usize;
22850    fn deser(
22851        _version: MavlinkVersion,
22852        __input: &[u8],
22853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22854        let avail_len = __input.len();
22855        let mut payload_buf = [0; Self::ENCODED_LEN];
22856        let mut buf = if avail_len < Self::ENCODED_LEN {
22857            payload_buf[0..avail_len].copy_from_slice(__input);
22858            Bytes::new(&payload_buf)
22859        } else {
22860            Bytes::new(__input)
22861        };
22862        let mut __struct = Self::default();
22863        __struct.target_system = buf.get_u8();
22864        __struct.target_component = buf.get_u8();
22865        for v in &mut __struct.id_or_mac {
22866            let val = buf.get_u8();
22867            *v = val;
22868        }
22869        let tmp = buf.get_u8();
22870        __struct.id_type =
22871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22872                enum_type: "MavOdidIdType",
22873                value: tmp as u32,
22874            })?;
22875        let tmp = buf.get_u8();
22876        __struct.ua_type =
22877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22878                enum_type: "MavOdidUaType",
22879                value: tmp as u32,
22880            })?;
22881        for v in &mut __struct.uas_id {
22882            let val = buf.get_u8();
22883            *v = val;
22884        }
22885        Ok(__struct)
22886    }
22887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22888        let mut __tmp = BytesMut::new(bytes);
22889        #[allow(clippy::absurd_extreme_comparisons)]
22890        #[allow(unused_comparisons)]
22891        if __tmp.remaining() < Self::ENCODED_LEN {
22892            panic!(
22893                "buffer is too small (need {} bytes, but got {})",
22894                Self::ENCODED_LEN,
22895                __tmp.remaining(),
22896            )
22897        }
22898        __tmp.put_u8(self.target_system);
22899        __tmp.put_u8(self.target_component);
22900        for val in &self.id_or_mac {
22901            __tmp.put_u8(*val);
22902        }
22903        __tmp.put_u8(self.id_type as u8);
22904        __tmp.put_u8(self.ua_type as u8);
22905        for val in &self.uas_id {
22906            __tmp.put_u8(*val);
22907        }
22908        if matches!(version, MavlinkVersion::V2) {
22909            let len = __tmp.len();
22910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22911        } else {
22912            __tmp.len()
22913        }
22914    }
22915}
22916#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22917#[doc = ""]
22918#[doc = "ID: 12901"]
22919#[derive(Debug, Clone, PartialEq)]
22920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22922#[cfg_attr(feature = "ts", derive(TS))]
22923#[cfg_attr(feature = "ts", ts(export))]
22924pub struct OPEN_DRONE_ID_LOCATION_DATA {
22925    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22926    pub latitude: i32,
22927    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22928    pub longitude: i32,
22929    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22930    pub altitude_barometric: f32,
22931    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22932    pub altitude_geodetic: f32,
22933    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22934    pub height: f32,
22935    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22936    pub timestamp: f32,
22937    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22938    pub direction: u16,
22939    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22940    pub speed_horizontal: u16,
22941    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22942    pub speed_vertical: i16,
22943    #[doc = "System ID (0 for broadcast)."]
22944    pub target_system: u8,
22945    #[doc = "Component ID (0 for broadcast)."]
22946    pub target_component: u8,
22947    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22950    pub id_or_mac: [u8; 20],
22951    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22952    pub status: MavOdidStatus,
22953    #[doc = "Indicates the reference point for the height field."]
22954    pub height_reference: MavOdidHeightRef,
22955    #[doc = "The accuracy of the horizontal position."]
22956    pub horizontal_accuracy: MavOdidHorAcc,
22957    #[doc = "The accuracy of the vertical position."]
22958    pub vertical_accuracy: MavOdidVerAcc,
22959    #[doc = "The accuracy of the barometric altitude."]
22960    pub barometer_accuracy: MavOdidVerAcc,
22961    #[doc = "The accuracy of the horizontal and vertical speed."]
22962    pub speed_accuracy: MavOdidSpeedAcc,
22963    #[doc = "The accuracy of the timestamps."]
22964    pub timestamp_accuracy: MavOdidTimeAcc,
22965}
22966impl OPEN_DRONE_ID_LOCATION_DATA {
22967    pub const ENCODED_LEN: usize = 59usize;
22968    pub const DEFAULT: Self = Self {
22969        latitude: 0_i32,
22970        longitude: 0_i32,
22971        altitude_barometric: 0.0_f32,
22972        altitude_geodetic: 0.0_f32,
22973        height: 0.0_f32,
22974        timestamp: 0.0_f32,
22975        direction: 0_u16,
22976        speed_horizontal: 0_u16,
22977        speed_vertical: 0_i16,
22978        target_system: 0_u8,
22979        target_component: 0_u8,
22980        id_or_mac: [0_u8; 20usize],
22981        status: MavOdidStatus::DEFAULT,
22982        height_reference: MavOdidHeightRef::DEFAULT,
22983        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22984        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22985        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22986        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22987        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22988    };
22989    #[cfg(feature = "arbitrary")]
22990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22991        use arbitrary::{Arbitrary, Unstructured};
22992        let mut buf = [0u8; 1024];
22993        rng.fill_bytes(&mut buf);
22994        let mut unstructured = Unstructured::new(&buf);
22995        Self::arbitrary(&mut unstructured).unwrap_or_default()
22996    }
22997}
22998impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22999    fn default() -> Self {
23000        Self::DEFAULT.clone()
23001    }
23002}
23003impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
23004    type Message = MavMessage;
23005    const ID: u32 = 12901u32;
23006    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
23007    const EXTRA_CRC: u8 = 254u8;
23008    const ENCODED_LEN: usize = 59usize;
23009    fn deser(
23010        _version: MavlinkVersion,
23011        __input: &[u8],
23012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23013        let avail_len = __input.len();
23014        let mut payload_buf = [0; Self::ENCODED_LEN];
23015        let mut buf = if avail_len < Self::ENCODED_LEN {
23016            payload_buf[0..avail_len].copy_from_slice(__input);
23017            Bytes::new(&payload_buf)
23018        } else {
23019            Bytes::new(__input)
23020        };
23021        let mut __struct = Self::default();
23022        __struct.latitude = buf.get_i32_le();
23023        __struct.longitude = buf.get_i32_le();
23024        __struct.altitude_barometric = buf.get_f32_le();
23025        __struct.altitude_geodetic = buf.get_f32_le();
23026        __struct.height = buf.get_f32_le();
23027        __struct.timestamp = buf.get_f32_le();
23028        __struct.direction = buf.get_u16_le();
23029        __struct.speed_horizontal = buf.get_u16_le();
23030        __struct.speed_vertical = buf.get_i16_le();
23031        __struct.target_system = buf.get_u8();
23032        __struct.target_component = buf.get_u8();
23033        for v in &mut __struct.id_or_mac {
23034            let val = buf.get_u8();
23035            *v = val;
23036        }
23037        let tmp = buf.get_u8();
23038        __struct.status =
23039            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23040                enum_type: "MavOdidStatus",
23041                value: tmp as u32,
23042            })?;
23043        let tmp = buf.get_u8();
23044        __struct.height_reference =
23045            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23046                enum_type: "MavOdidHeightRef",
23047                value: tmp as u32,
23048            })?;
23049        let tmp = buf.get_u8();
23050        __struct.horizontal_accuracy =
23051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23052                enum_type: "MavOdidHorAcc",
23053                value: tmp as u32,
23054            })?;
23055        let tmp = buf.get_u8();
23056        __struct.vertical_accuracy =
23057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23058                enum_type: "MavOdidVerAcc",
23059                value: tmp as u32,
23060            })?;
23061        let tmp = buf.get_u8();
23062        __struct.barometer_accuracy =
23063            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23064                enum_type: "MavOdidVerAcc",
23065                value: tmp as u32,
23066            })?;
23067        let tmp = buf.get_u8();
23068        __struct.speed_accuracy =
23069            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23070                enum_type: "MavOdidSpeedAcc",
23071                value: tmp as u32,
23072            })?;
23073        let tmp = buf.get_u8();
23074        __struct.timestamp_accuracy =
23075            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23076                enum_type: "MavOdidTimeAcc",
23077                value: tmp as u32,
23078            })?;
23079        Ok(__struct)
23080    }
23081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23082        let mut __tmp = BytesMut::new(bytes);
23083        #[allow(clippy::absurd_extreme_comparisons)]
23084        #[allow(unused_comparisons)]
23085        if __tmp.remaining() < Self::ENCODED_LEN {
23086            panic!(
23087                "buffer is too small (need {} bytes, but got {})",
23088                Self::ENCODED_LEN,
23089                __tmp.remaining(),
23090            )
23091        }
23092        __tmp.put_i32_le(self.latitude);
23093        __tmp.put_i32_le(self.longitude);
23094        __tmp.put_f32_le(self.altitude_barometric);
23095        __tmp.put_f32_le(self.altitude_geodetic);
23096        __tmp.put_f32_le(self.height);
23097        __tmp.put_f32_le(self.timestamp);
23098        __tmp.put_u16_le(self.direction);
23099        __tmp.put_u16_le(self.speed_horizontal);
23100        __tmp.put_i16_le(self.speed_vertical);
23101        __tmp.put_u8(self.target_system);
23102        __tmp.put_u8(self.target_component);
23103        for val in &self.id_or_mac {
23104            __tmp.put_u8(*val);
23105        }
23106        __tmp.put_u8(self.status as u8);
23107        __tmp.put_u8(self.height_reference as u8);
23108        __tmp.put_u8(self.horizontal_accuracy as u8);
23109        __tmp.put_u8(self.vertical_accuracy as u8);
23110        __tmp.put_u8(self.barometer_accuracy as u8);
23111        __tmp.put_u8(self.speed_accuracy as u8);
23112        __tmp.put_u8(self.timestamp_accuracy as u8);
23113        if matches!(version, MavlinkVersion::V2) {
23114            let len = __tmp.len();
23115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23116        } else {
23117            __tmp.len()
23118        }
23119    }
23120}
23121#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
23122#[doc = ""]
23123#[doc = "ID: 12915"]
23124#[derive(Debug, Clone, PartialEq)]
23125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23127#[cfg_attr(feature = "ts", derive(TS))]
23128#[cfg_attr(feature = "ts", ts(export))]
23129pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23130    #[doc = "System ID (0 for broadcast)."]
23131    pub target_system: u8,
23132    #[doc = "Component ID (0 for broadcast)."]
23133    pub target_component: u8,
23134    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23137    pub id_or_mac: [u8; 20],
23138    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
23139    pub single_message_size: u8,
23140    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
23141    pub msg_pack_size: u8,
23142    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
23143    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23144    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23145    pub messages: [u8; 225],
23146}
23147impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23148    pub const ENCODED_LEN: usize = 249usize;
23149    pub const DEFAULT: Self = Self {
23150        target_system: 0_u8,
23151        target_component: 0_u8,
23152        id_or_mac: [0_u8; 20usize],
23153        single_message_size: 0_u8,
23154        msg_pack_size: 0_u8,
23155        messages: [0_u8; 225usize],
23156    };
23157    #[cfg(feature = "arbitrary")]
23158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23159        use arbitrary::{Arbitrary, Unstructured};
23160        let mut buf = [0u8; 1024];
23161        rng.fill_bytes(&mut buf);
23162        let mut unstructured = Unstructured::new(&buf);
23163        Self::arbitrary(&mut unstructured).unwrap_or_default()
23164    }
23165}
23166impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23167    fn default() -> Self {
23168        Self::DEFAULT.clone()
23169    }
23170}
23171impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23172    type Message = MavMessage;
23173    const ID: u32 = 12915u32;
23174    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23175    const EXTRA_CRC: u8 = 94u8;
23176    const ENCODED_LEN: usize = 249usize;
23177    fn deser(
23178        _version: MavlinkVersion,
23179        __input: &[u8],
23180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23181        let avail_len = __input.len();
23182        let mut payload_buf = [0; Self::ENCODED_LEN];
23183        let mut buf = if avail_len < Self::ENCODED_LEN {
23184            payload_buf[0..avail_len].copy_from_slice(__input);
23185            Bytes::new(&payload_buf)
23186        } else {
23187            Bytes::new(__input)
23188        };
23189        let mut __struct = Self::default();
23190        __struct.target_system = buf.get_u8();
23191        __struct.target_component = buf.get_u8();
23192        for v in &mut __struct.id_or_mac {
23193            let val = buf.get_u8();
23194            *v = val;
23195        }
23196        __struct.single_message_size = buf.get_u8();
23197        __struct.msg_pack_size = buf.get_u8();
23198        for v in &mut __struct.messages {
23199            let val = buf.get_u8();
23200            *v = val;
23201        }
23202        Ok(__struct)
23203    }
23204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23205        let mut __tmp = BytesMut::new(bytes);
23206        #[allow(clippy::absurd_extreme_comparisons)]
23207        #[allow(unused_comparisons)]
23208        if __tmp.remaining() < Self::ENCODED_LEN {
23209            panic!(
23210                "buffer is too small (need {} bytes, but got {})",
23211                Self::ENCODED_LEN,
23212                __tmp.remaining(),
23213            )
23214        }
23215        __tmp.put_u8(self.target_system);
23216        __tmp.put_u8(self.target_component);
23217        for val in &self.id_or_mac {
23218            __tmp.put_u8(*val);
23219        }
23220        __tmp.put_u8(self.single_message_size);
23221        __tmp.put_u8(self.msg_pack_size);
23222        for val in &self.messages {
23223            __tmp.put_u8(*val);
23224        }
23225        if matches!(version, MavlinkVersion::V2) {
23226            let len = __tmp.len();
23227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23228        } else {
23229            __tmp.len()
23230        }
23231    }
23232}
23233#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23234#[doc = ""]
23235#[doc = "ID: 12905"]
23236#[derive(Debug, Clone, PartialEq)]
23237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23239#[cfg_attr(feature = "ts", derive(TS))]
23240#[cfg_attr(feature = "ts", ts(export))]
23241pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23242    #[doc = "System ID (0 for broadcast)."]
23243    pub target_system: u8,
23244    #[doc = "Component ID (0 for broadcast)."]
23245    pub target_component: u8,
23246    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23248    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23249    pub id_or_mac: [u8; 20],
23250    #[doc = "Indicates the type of the operator_id field."]
23251    pub operator_id_type: MavOdidOperatorIdType,
23252    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23253    #[cfg_attr(
23254        feature = "serde",
23255        serde(
23256            serialize_with = "crate::nulstr::serialize::<_, 20>",
23257            deserialize_with = "crate::nulstr::deserialize::<_, 20>"
23258        )
23259    )]
23260    #[cfg_attr(feature = "ts", ts(type = "string"))]
23261    pub operator_id: [u8; 20],
23262}
23263impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23264    pub const ENCODED_LEN: usize = 43usize;
23265    pub const DEFAULT: Self = Self {
23266        target_system: 0_u8,
23267        target_component: 0_u8,
23268        id_or_mac: [0_u8; 20usize],
23269        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23270        operator_id: [0_u8; 20usize],
23271    };
23272    #[cfg(feature = "arbitrary")]
23273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23274        use arbitrary::{Arbitrary, Unstructured};
23275        let mut buf = [0u8; 1024];
23276        rng.fill_bytes(&mut buf);
23277        let mut unstructured = Unstructured::new(&buf);
23278        Self::arbitrary(&mut unstructured).unwrap_or_default()
23279    }
23280}
23281impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23282    fn default() -> Self {
23283        Self::DEFAULT.clone()
23284    }
23285}
23286impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23287    type Message = MavMessage;
23288    const ID: u32 = 12905u32;
23289    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23290    const EXTRA_CRC: u8 = 49u8;
23291    const ENCODED_LEN: usize = 43usize;
23292    fn deser(
23293        _version: MavlinkVersion,
23294        __input: &[u8],
23295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23296        let avail_len = __input.len();
23297        let mut payload_buf = [0; Self::ENCODED_LEN];
23298        let mut buf = if avail_len < Self::ENCODED_LEN {
23299            payload_buf[0..avail_len].copy_from_slice(__input);
23300            Bytes::new(&payload_buf)
23301        } else {
23302            Bytes::new(__input)
23303        };
23304        let mut __struct = Self::default();
23305        __struct.target_system = buf.get_u8();
23306        __struct.target_component = buf.get_u8();
23307        for v in &mut __struct.id_or_mac {
23308            let val = buf.get_u8();
23309            *v = val;
23310        }
23311        let tmp = buf.get_u8();
23312        __struct.operator_id_type =
23313            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23314                enum_type: "MavOdidOperatorIdType",
23315                value: tmp as u32,
23316            })?;
23317        for v in &mut __struct.operator_id {
23318            let val = buf.get_u8();
23319            *v = val;
23320        }
23321        Ok(__struct)
23322    }
23323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23324        let mut __tmp = BytesMut::new(bytes);
23325        #[allow(clippy::absurd_extreme_comparisons)]
23326        #[allow(unused_comparisons)]
23327        if __tmp.remaining() < Self::ENCODED_LEN {
23328            panic!(
23329                "buffer is too small (need {} bytes, but got {})",
23330                Self::ENCODED_LEN,
23331                __tmp.remaining(),
23332            )
23333        }
23334        __tmp.put_u8(self.target_system);
23335        __tmp.put_u8(self.target_component);
23336        for val in &self.id_or_mac {
23337            __tmp.put_u8(*val);
23338        }
23339        __tmp.put_u8(self.operator_id_type as u8);
23340        for val in &self.operator_id {
23341            __tmp.put_u8(*val);
23342        }
23343        if matches!(version, MavlinkVersion::V2) {
23344            let len = __tmp.len();
23345            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23346        } else {
23347            __tmp.len()
23348        }
23349    }
23350}
23351#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23352#[doc = ""]
23353#[doc = "ID: 12903"]
23354#[derive(Debug, Clone, PartialEq)]
23355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23357#[cfg_attr(feature = "ts", derive(TS))]
23358#[cfg_attr(feature = "ts", ts(export))]
23359pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23360    #[doc = "System ID (0 for broadcast)."]
23361    pub target_system: u8,
23362    #[doc = "Component ID (0 for broadcast)."]
23363    pub target_component: u8,
23364    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23366    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23367    pub id_or_mac: [u8; 20],
23368    #[doc = "Indicates the type of the description field."]
23369    pub description_type: MavOdidDescType,
23370    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23371    #[cfg_attr(
23372        feature = "serde",
23373        serde(
23374            serialize_with = "crate::nulstr::serialize::<_, 23>",
23375            deserialize_with = "crate::nulstr::deserialize::<_, 23>"
23376        )
23377    )]
23378    #[cfg_attr(feature = "ts", ts(type = "string"))]
23379    pub description: [u8; 23],
23380}
23381impl OPEN_DRONE_ID_SELF_ID_DATA {
23382    pub const ENCODED_LEN: usize = 46usize;
23383    pub const DEFAULT: Self = Self {
23384        target_system: 0_u8,
23385        target_component: 0_u8,
23386        id_or_mac: [0_u8; 20usize],
23387        description_type: MavOdidDescType::DEFAULT,
23388        description: [0_u8; 23usize],
23389    };
23390    #[cfg(feature = "arbitrary")]
23391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23392        use arbitrary::{Arbitrary, Unstructured};
23393        let mut buf = [0u8; 1024];
23394        rng.fill_bytes(&mut buf);
23395        let mut unstructured = Unstructured::new(&buf);
23396        Self::arbitrary(&mut unstructured).unwrap_or_default()
23397    }
23398}
23399impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23400    fn default() -> Self {
23401        Self::DEFAULT.clone()
23402    }
23403}
23404impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23405    type Message = MavMessage;
23406    const ID: u32 = 12903u32;
23407    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23408    const EXTRA_CRC: u8 = 249u8;
23409    const ENCODED_LEN: usize = 46usize;
23410    fn deser(
23411        _version: MavlinkVersion,
23412        __input: &[u8],
23413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23414        let avail_len = __input.len();
23415        let mut payload_buf = [0; Self::ENCODED_LEN];
23416        let mut buf = if avail_len < Self::ENCODED_LEN {
23417            payload_buf[0..avail_len].copy_from_slice(__input);
23418            Bytes::new(&payload_buf)
23419        } else {
23420            Bytes::new(__input)
23421        };
23422        let mut __struct = Self::default();
23423        __struct.target_system = buf.get_u8();
23424        __struct.target_component = buf.get_u8();
23425        for v in &mut __struct.id_or_mac {
23426            let val = buf.get_u8();
23427            *v = val;
23428        }
23429        let tmp = buf.get_u8();
23430        __struct.description_type =
23431            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23432                enum_type: "MavOdidDescType",
23433                value: tmp as u32,
23434            })?;
23435        for v in &mut __struct.description {
23436            let val = buf.get_u8();
23437            *v = val;
23438        }
23439        Ok(__struct)
23440    }
23441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23442        let mut __tmp = BytesMut::new(bytes);
23443        #[allow(clippy::absurd_extreme_comparisons)]
23444        #[allow(unused_comparisons)]
23445        if __tmp.remaining() < Self::ENCODED_LEN {
23446            panic!(
23447                "buffer is too small (need {} bytes, but got {})",
23448                Self::ENCODED_LEN,
23449                __tmp.remaining(),
23450            )
23451        }
23452        __tmp.put_u8(self.target_system);
23453        __tmp.put_u8(self.target_component);
23454        for val in &self.id_or_mac {
23455            __tmp.put_u8(*val);
23456        }
23457        __tmp.put_u8(self.description_type as u8);
23458        for val in &self.description {
23459            __tmp.put_u8(*val);
23460        }
23461        if matches!(version, MavlinkVersion::V2) {
23462            let len = __tmp.len();
23463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23464        } else {
23465            __tmp.len()
23466        }
23467    }
23468}
23469#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23470#[doc = ""]
23471#[doc = "ID: 12904"]
23472#[derive(Debug, Clone, PartialEq)]
23473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23475#[cfg_attr(feature = "ts", derive(TS))]
23476#[cfg_attr(feature = "ts", ts(export))]
23477pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23478    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23479    pub operator_latitude: i32,
23480    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23481    pub operator_longitude: i32,
23482    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23483    pub area_ceiling: f32,
23484    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23485    pub area_floor: f32,
23486    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23487    pub operator_altitude_geo: f32,
23488    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23489    pub timestamp: u32,
23490    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23491    pub area_count: u16,
23492    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23493    pub area_radius: u16,
23494    #[doc = "System ID (0 for broadcast)."]
23495    pub target_system: u8,
23496    #[doc = "Component ID (0 for broadcast)."]
23497    pub target_component: u8,
23498    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23501    pub id_or_mac: [u8; 20],
23502    #[doc = "Specifies the operator location type."]
23503    pub operator_location_type: MavOdidOperatorLocationType,
23504    #[doc = "Specifies the classification type of the UA."]
23505    pub classification_type: MavOdidClassificationType,
23506    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23507    pub category_eu: MavOdidCategoryEu,
23508    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23509    pub class_eu: MavOdidClassEu,
23510}
23511impl OPEN_DRONE_ID_SYSTEM_DATA {
23512    pub const ENCODED_LEN: usize = 54usize;
23513    pub const DEFAULT: Self = Self {
23514        operator_latitude: 0_i32,
23515        operator_longitude: 0_i32,
23516        area_ceiling: 0.0_f32,
23517        area_floor: 0.0_f32,
23518        operator_altitude_geo: 0.0_f32,
23519        timestamp: 0_u32,
23520        area_count: 0_u16,
23521        area_radius: 0_u16,
23522        target_system: 0_u8,
23523        target_component: 0_u8,
23524        id_or_mac: [0_u8; 20usize],
23525        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23526        classification_type: MavOdidClassificationType::DEFAULT,
23527        category_eu: MavOdidCategoryEu::DEFAULT,
23528        class_eu: MavOdidClassEu::DEFAULT,
23529    };
23530    #[cfg(feature = "arbitrary")]
23531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23532        use arbitrary::{Arbitrary, Unstructured};
23533        let mut buf = [0u8; 1024];
23534        rng.fill_bytes(&mut buf);
23535        let mut unstructured = Unstructured::new(&buf);
23536        Self::arbitrary(&mut unstructured).unwrap_or_default()
23537    }
23538}
23539impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23540    fn default() -> Self {
23541        Self::DEFAULT.clone()
23542    }
23543}
23544impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23545    type Message = MavMessage;
23546    const ID: u32 = 12904u32;
23547    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23548    const EXTRA_CRC: u8 = 77u8;
23549    const ENCODED_LEN: usize = 54usize;
23550    fn deser(
23551        _version: MavlinkVersion,
23552        __input: &[u8],
23553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23554        let avail_len = __input.len();
23555        let mut payload_buf = [0; Self::ENCODED_LEN];
23556        let mut buf = if avail_len < Self::ENCODED_LEN {
23557            payload_buf[0..avail_len].copy_from_slice(__input);
23558            Bytes::new(&payload_buf)
23559        } else {
23560            Bytes::new(__input)
23561        };
23562        let mut __struct = Self::default();
23563        __struct.operator_latitude = buf.get_i32_le();
23564        __struct.operator_longitude = buf.get_i32_le();
23565        __struct.area_ceiling = buf.get_f32_le();
23566        __struct.area_floor = buf.get_f32_le();
23567        __struct.operator_altitude_geo = buf.get_f32_le();
23568        __struct.timestamp = buf.get_u32_le();
23569        __struct.area_count = buf.get_u16_le();
23570        __struct.area_radius = buf.get_u16_le();
23571        __struct.target_system = buf.get_u8();
23572        __struct.target_component = buf.get_u8();
23573        for v in &mut __struct.id_or_mac {
23574            let val = buf.get_u8();
23575            *v = val;
23576        }
23577        let tmp = buf.get_u8();
23578        __struct.operator_location_type =
23579            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23580                enum_type: "MavOdidOperatorLocationType",
23581                value: tmp as u32,
23582            })?;
23583        let tmp = buf.get_u8();
23584        __struct.classification_type =
23585            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23586                enum_type: "MavOdidClassificationType",
23587                value: tmp as u32,
23588            })?;
23589        let tmp = buf.get_u8();
23590        __struct.category_eu =
23591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23592                enum_type: "MavOdidCategoryEu",
23593                value: tmp as u32,
23594            })?;
23595        let tmp = buf.get_u8();
23596        __struct.class_eu =
23597            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23598                enum_type: "MavOdidClassEu",
23599                value: tmp as u32,
23600            })?;
23601        Ok(__struct)
23602    }
23603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23604        let mut __tmp = BytesMut::new(bytes);
23605        #[allow(clippy::absurd_extreme_comparisons)]
23606        #[allow(unused_comparisons)]
23607        if __tmp.remaining() < Self::ENCODED_LEN {
23608            panic!(
23609                "buffer is too small (need {} bytes, but got {})",
23610                Self::ENCODED_LEN,
23611                __tmp.remaining(),
23612            )
23613        }
23614        __tmp.put_i32_le(self.operator_latitude);
23615        __tmp.put_i32_le(self.operator_longitude);
23616        __tmp.put_f32_le(self.area_ceiling);
23617        __tmp.put_f32_le(self.area_floor);
23618        __tmp.put_f32_le(self.operator_altitude_geo);
23619        __tmp.put_u32_le(self.timestamp);
23620        __tmp.put_u16_le(self.area_count);
23621        __tmp.put_u16_le(self.area_radius);
23622        __tmp.put_u8(self.target_system);
23623        __tmp.put_u8(self.target_component);
23624        for val in &self.id_or_mac {
23625            __tmp.put_u8(*val);
23626        }
23627        __tmp.put_u8(self.operator_location_type as u8);
23628        __tmp.put_u8(self.classification_type as u8);
23629        __tmp.put_u8(self.category_eu as u8);
23630        __tmp.put_u8(self.class_eu as u8);
23631        if matches!(version, MavlinkVersion::V2) {
23632            let len = __tmp.len();
23633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23634        } else {
23635            __tmp.len()
23636        }
23637    }
23638}
23639#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23640#[doc = ""]
23641#[doc = "ID: 12919"]
23642#[derive(Debug, Clone, PartialEq)]
23643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23645#[cfg_attr(feature = "ts", derive(TS))]
23646#[cfg_attr(feature = "ts", ts(export))]
23647pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23648    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23649    pub operator_latitude: i32,
23650    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23651    pub operator_longitude: i32,
23652    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23653    pub operator_altitude_geo: f32,
23654    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23655    pub timestamp: u32,
23656    #[doc = "System ID (0 for broadcast)."]
23657    pub target_system: u8,
23658    #[doc = "Component ID (0 for broadcast)."]
23659    pub target_component: u8,
23660}
23661impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23662    pub const ENCODED_LEN: usize = 18usize;
23663    pub const DEFAULT: Self = Self {
23664        operator_latitude: 0_i32,
23665        operator_longitude: 0_i32,
23666        operator_altitude_geo: 0.0_f32,
23667        timestamp: 0_u32,
23668        target_system: 0_u8,
23669        target_component: 0_u8,
23670    };
23671    #[cfg(feature = "arbitrary")]
23672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23673        use arbitrary::{Arbitrary, Unstructured};
23674        let mut buf = [0u8; 1024];
23675        rng.fill_bytes(&mut buf);
23676        let mut unstructured = Unstructured::new(&buf);
23677        Self::arbitrary(&mut unstructured).unwrap_or_default()
23678    }
23679}
23680impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23681    fn default() -> Self {
23682        Self::DEFAULT.clone()
23683    }
23684}
23685impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23686    type Message = MavMessage;
23687    const ID: u32 = 12919u32;
23688    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23689    const EXTRA_CRC: u8 = 7u8;
23690    const ENCODED_LEN: usize = 18usize;
23691    fn deser(
23692        _version: MavlinkVersion,
23693        __input: &[u8],
23694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23695        let avail_len = __input.len();
23696        let mut payload_buf = [0; Self::ENCODED_LEN];
23697        let mut buf = if avail_len < Self::ENCODED_LEN {
23698            payload_buf[0..avail_len].copy_from_slice(__input);
23699            Bytes::new(&payload_buf)
23700        } else {
23701            Bytes::new(__input)
23702        };
23703        let mut __struct = Self::default();
23704        __struct.operator_latitude = buf.get_i32_le();
23705        __struct.operator_longitude = buf.get_i32_le();
23706        __struct.operator_altitude_geo = buf.get_f32_le();
23707        __struct.timestamp = buf.get_u32_le();
23708        __struct.target_system = buf.get_u8();
23709        __struct.target_component = buf.get_u8();
23710        Ok(__struct)
23711    }
23712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23713        let mut __tmp = BytesMut::new(bytes);
23714        #[allow(clippy::absurd_extreme_comparisons)]
23715        #[allow(unused_comparisons)]
23716        if __tmp.remaining() < Self::ENCODED_LEN {
23717            panic!(
23718                "buffer is too small (need {} bytes, but got {})",
23719                Self::ENCODED_LEN,
23720                __tmp.remaining(),
23721            )
23722        }
23723        __tmp.put_i32_le(self.operator_latitude);
23724        __tmp.put_i32_le(self.operator_longitude);
23725        __tmp.put_f32_le(self.operator_altitude_geo);
23726        __tmp.put_u32_le(self.timestamp);
23727        __tmp.put_u8(self.target_system);
23728        __tmp.put_u8(self.target_component);
23729        if matches!(version, MavlinkVersion::V2) {
23730            let len = __tmp.len();
23731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23732        } else {
23733            __tmp.len()
23734        }
23735    }
23736}
23737#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23738#[doc = ""]
23739#[doc = "ID: 100"]
23740#[derive(Debug, Clone, PartialEq)]
23741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23743#[cfg_attr(feature = "ts", derive(TS))]
23744#[cfg_attr(feature = "ts", ts(export))]
23745pub struct OPTICAL_FLOW_DATA {
23746    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23747    pub time_usec: u64,
23748    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23749    pub flow_comp_m_x: f32,
23750    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23751    pub flow_comp_m_y: f32,
23752    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23753    pub ground_distance: f32,
23754    #[doc = "Flow in x-sensor direction"]
23755    pub flow_x: i16,
23756    #[doc = "Flow in y-sensor direction"]
23757    pub flow_y: i16,
23758    #[doc = "Sensor ID"]
23759    pub sensor_id: u8,
23760    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23761    pub quality: u8,
23762    #[doc = "Flow rate about X axis"]
23763    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23764    pub flow_rate_x: f32,
23765    #[doc = "Flow rate about Y axis"]
23766    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23767    pub flow_rate_y: f32,
23768}
23769impl OPTICAL_FLOW_DATA {
23770    pub const ENCODED_LEN: usize = 34usize;
23771    pub const DEFAULT: Self = Self {
23772        time_usec: 0_u64,
23773        flow_comp_m_x: 0.0_f32,
23774        flow_comp_m_y: 0.0_f32,
23775        ground_distance: 0.0_f32,
23776        flow_x: 0_i16,
23777        flow_y: 0_i16,
23778        sensor_id: 0_u8,
23779        quality: 0_u8,
23780        flow_rate_x: 0.0_f32,
23781        flow_rate_y: 0.0_f32,
23782    };
23783    #[cfg(feature = "arbitrary")]
23784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23785        use arbitrary::{Arbitrary, Unstructured};
23786        let mut buf = [0u8; 1024];
23787        rng.fill_bytes(&mut buf);
23788        let mut unstructured = Unstructured::new(&buf);
23789        Self::arbitrary(&mut unstructured).unwrap_or_default()
23790    }
23791}
23792impl Default for OPTICAL_FLOW_DATA {
23793    fn default() -> Self {
23794        Self::DEFAULT.clone()
23795    }
23796}
23797impl MessageData for OPTICAL_FLOW_DATA {
23798    type Message = MavMessage;
23799    const ID: u32 = 100u32;
23800    const NAME: &'static str = "OPTICAL_FLOW";
23801    const EXTRA_CRC: u8 = 175u8;
23802    const ENCODED_LEN: usize = 34usize;
23803    fn deser(
23804        _version: MavlinkVersion,
23805        __input: &[u8],
23806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23807        let avail_len = __input.len();
23808        let mut payload_buf = [0; Self::ENCODED_LEN];
23809        let mut buf = if avail_len < Self::ENCODED_LEN {
23810            payload_buf[0..avail_len].copy_from_slice(__input);
23811            Bytes::new(&payload_buf)
23812        } else {
23813            Bytes::new(__input)
23814        };
23815        let mut __struct = Self::default();
23816        __struct.time_usec = buf.get_u64_le();
23817        __struct.flow_comp_m_x = buf.get_f32_le();
23818        __struct.flow_comp_m_y = buf.get_f32_le();
23819        __struct.ground_distance = buf.get_f32_le();
23820        __struct.flow_x = buf.get_i16_le();
23821        __struct.flow_y = buf.get_i16_le();
23822        __struct.sensor_id = buf.get_u8();
23823        __struct.quality = buf.get_u8();
23824        __struct.flow_rate_x = buf.get_f32_le();
23825        __struct.flow_rate_y = buf.get_f32_le();
23826        Ok(__struct)
23827    }
23828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23829        let mut __tmp = BytesMut::new(bytes);
23830        #[allow(clippy::absurd_extreme_comparisons)]
23831        #[allow(unused_comparisons)]
23832        if __tmp.remaining() < Self::ENCODED_LEN {
23833            panic!(
23834                "buffer is too small (need {} bytes, but got {})",
23835                Self::ENCODED_LEN,
23836                __tmp.remaining(),
23837            )
23838        }
23839        __tmp.put_u64_le(self.time_usec);
23840        __tmp.put_f32_le(self.flow_comp_m_x);
23841        __tmp.put_f32_le(self.flow_comp_m_y);
23842        __tmp.put_f32_le(self.ground_distance);
23843        __tmp.put_i16_le(self.flow_x);
23844        __tmp.put_i16_le(self.flow_y);
23845        __tmp.put_u8(self.sensor_id);
23846        __tmp.put_u8(self.quality);
23847        if matches!(version, MavlinkVersion::V2) {
23848            __tmp.put_f32_le(self.flow_rate_x);
23849            __tmp.put_f32_le(self.flow_rate_y);
23850            let len = __tmp.len();
23851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23852        } else {
23853            __tmp.len()
23854        }
23855    }
23856}
23857#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23858#[doc = ""]
23859#[doc = "ID: 106"]
23860#[derive(Debug, Clone, PartialEq)]
23861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23863#[cfg_attr(feature = "ts", derive(TS))]
23864#[cfg_attr(feature = "ts", ts(export))]
23865pub struct OPTICAL_FLOW_RAD_DATA {
23866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23867    pub time_usec: u64,
23868    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23869    pub integration_time_us: u32,
23870    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23871    pub integrated_x: f32,
23872    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23873    pub integrated_y: f32,
23874    #[doc = "RH rotation around X axis"]
23875    pub integrated_xgyro: f32,
23876    #[doc = "RH rotation around Y axis"]
23877    pub integrated_ygyro: f32,
23878    #[doc = "RH rotation around Z axis"]
23879    pub integrated_zgyro: f32,
23880    #[doc = "Time since the distance was sampled."]
23881    pub time_delta_distance_us: u32,
23882    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23883    pub distance: f32,
23884    #[doc = "Temperature"]
23885    pub temperature: i16,
23886    #[doc = "Sensor ID"]
23887    pub sensor_id: u8,
23888    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23889    pub quality: u8,
23890}
23891impl OPTICAL_FLOW_RAD_DATA {
23892    pub const ENCODED_LEN: usize = 44usize;
23893    pub const DEFAULT: Self = Self {
23894        time_usec: 0_u64,
23895        integration_time_us: 0_u32,
23896        integrated_x: 0.0_f32,
23897        integrated_y: 0.0_f32,
23898        integrated_xgyro: 0.0_f32,
23899        integrated_ygyro: 0.0_f32,
23900        integrated_zgyro: 0.0_f32,
23901        time_delta_distance_us: 0_u32,
23902        distance: 0.0_f32,
23903        temperature: 0_i16,
23904        sensor_id: 0_u8,
23905        quality: 0_u8,
23906    };
23907    #[cfg(feature = "arbitrary")]
23908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23909        use arbitrary::{Arbitrary, Unstructured};
23910        let mut buf = [0u8; 1024];
23911        rng.fill_bytes(&mut buf);
23912        let mut unstructured = Unstructured::new(&buf);
23913        Self::arbitrary(&mut unstructured).unwrap_or_default()
23914    }
23915}
23916impl Default for OPTICAL_FLOW_RAD_DATA {
23917    fn default() -> Self {
23918        Self::DEFAULT.clone()
23919    }
23920}
23921impl MessageData for OPTICAL_FLOW_RAD_DATA {
23922    type Message = MavMessage;
23923    const ID: u32 = 106u32;
23924    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23925    const EXTRA_CRC: u8 = 138u8;
23926    const ENCODED_LEN: usize = 44usize;
23927    fn deser(
23928        _version: MavlinkVersion,
23929        __input: &[u8],
23930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23931        let avail_len = __input.len();
23932        let mut payload_buf = [0; Self::ENCODED_LEN];
23933        let mut buf = if avail_len < Self::ENCODED_LEN {
23934            payload_buf[0..avail_len].copy_from_slice(__input);
23935            Bytes::new(&payload_buf)
23936        } else {
23937            Bytes::new(__input)
23938        };
23939        let mut __struct = Self::default();
23940        __struct.time_usec = buf.get_u64_le();
23941        __struct.integration_time_us = buf.get_u32_le();
23942        __struct.integrated_x = buf.get_f32_le();
23943        __struct.integrated_y = buf.get_f32_le();
23944        __struct.integrated_xgyro = buf.get_f32_le();
23945        __struct.integrated_ygyro = buf.get_f32_le();
23946        __struct.integrated_zgyro = buf.get_f32_le();
23947        __struct.time_delta_distance_us = buf.get_u32_le();
23948        __struct.distance = buf.get_f32_le();
23949        __struct.temperature = buf.get_i16_le();
23950        __struct.sensor_id = buf.get_u8();
23951        __struct.quality = buf.get_u8();
23952        Ok(__struct)
23953    }
23954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23955        let mut __tmp = BytesMut::new(bytes);
23956        #[allow(clippy::absurd_extreme_comparisons)]
23957        #[allow(unused_comparisons)]
23958        if __tmp.remaining() < Self::ENCODED_LEN {
23959            panic!(
23960                "buffer is too small (need {} bytes, but got {})",
23961                Self::ENCODED_LEN,
23962                __tmp.remaining(),
23963            )
23964        }
23965        __tmp.put_u64_le(self.time_usec);
23966        __tmp.put_u32_le(self.integration_time_us);
23967        __tmp.put_f32_le(self.integrated_x);
23968        __tmp.put_f32_le(self.integrated_y);
23969        __tmp.put_f32_le(self.integrated_xgyro);
23970        __tmp.put_f32_le(self.integrated_ygyro);
23971        __tmp.put_f32_le(self.integrated_zgyro);
23972        __tmp.put_u32_le(self.time_delta_distance_us);
23973        __tmp.put_f32_le(self.distance);
23974        __tmp.put_i16_le(self.temperature);
23975        __tmp.put_u8(self.sensor_id);
23976        __tmp.put_u8(self.quality);
23977        if matches!(version, MavlinkVersion::V2) {
23978            let len = __tmp.len();
23979            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23980        } else {
23981            __tmp.len()
23982        }
23983    }
23984}
23985#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23986#[doc = ""]
23987#[doc = "ID: 360"]
23988#[derive(Debug, Clone, PartialEq)]
23989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23991#[cfg_attr(feature = "ts", derive(TS))]
23992#[cfg_attr(feature = "ts", ts(export))]
23993pub struct ORBIT_EXECUTION_STATUS_DATA {
23994    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23995    pub time_usec: u64,
23996    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23997    pub radius: f32,
23998    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23999    pub x: i32,
24000    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24001    pub y: i32,
24002    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
24003    pub z: f32,
24004    #[doc = "The coordinate system of the fields: x, y, z."]
24005    pub frame: MavFrame,
24006}
24007impl ORBIT_EXECUTION_STATUS_DATA {
24008    pub const ENCODED_LEN: usize = 25usize;
24009    pub const DEFAULT: Self = Self {
24010        time_usec: 0_u64,
24011        radius: 0.0_f32,
24012        x: 0_i32,
24013        y: 0_i32,
24014        z: 0.0_f32,
24015        frame: MavFrame::DEFAULT,
24016    };
24017    #[cfg(feature = "arbitrary")]
24018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24019        use arbitrary::{Arbitrary, Unstructured};
24020        let mut buf = [0u8; 1024];
24021        rng.fill_bytes(&mut buf);
24022        let mut unstructured = Unstructured::new(&buf);
24023        Self::arbitrary(&mut unstructured).unwrap_or_default()
24024    }
24025}
24026impl Default for ORBIT_EXECUTION_STATUS_DATA {
24027    fn default() -> Self {
24028        Self::DEFAULT.clone()
24029    }
24030}
24031impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
24032    type Message = MavMessage;
24033    const ID: u32 = 360u32;
24034    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
24035    const EXTRA_CRC: u8 = 11u8;
24036    const ENCODED_LEN: usize = 25usize;
24037    fn deser(
24038        _version: MavlinkVersion,
24039        __input: &[u8],
24040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24041        let avail_len = __input.len();
24042        let mut payload_buf = [0; Self::ENCODED_LEN];
24043        let mut buf = if avail_len < Self::ENCODED_LEN {
24044            payload_buf[0..avail_len].copy_from_slice(__input);
24045            Bytes::new(&payload_buf)
24046        } else {
24047            Bytes::new(__input)
24048        };
24049        let mut __struct = Self::default();
24050        __struct.time_usec = buf.get_u64_le();
24051        __struct.radius = buf.get_f32_le();
24052        __struct.x = buf.get_i32_le();
24053        __struct.y = buf.get_i32_le();
24054        __struct.z = buf.get_f32_le();
24055        let tmp = buf.get_u8();
24056        __struct.frame =
24057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24058                enum_type: "MavFrame",
24059                value: tmp as u32,
24060            })?;
24061        Ok(__struct)
24062    }
24063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24064        let mut __tmp = BytesMut::new(bytes);
24065        #[allow(clippy::absurd_extreme_comparisons)]
24066        #[allow(unused_comparisons)]
24067        if __tmp.remaining() < Self::ENCODED_LEN {
24068            panic!(
24069                "buffer is too small (need {} bytes, but got {})",
24070                Self::ENCODED_LEN,
24071                __tmp.remaining(),
24072            )
24073        }
24074        __tmp.put_u64_le(self.time_usec);
24075        __tmp.put_f32_le(self.radius);
24076        __tmp.put_i32_le(self.x);
24077        __tmp.put_i32_le(self.y);
24078        __tmp.put_f32_le(self.z);
24079        __tmp.put_u8(self.frame as u8);
24080        if matches!(version, MavlinkVersion::V2) {
24081            let len = __tmp.len();
24082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24083        } else {
24084            __tmp.len()
24085        }
24086    }
24087}
24088#[doc = "Response from a PARAM_EXT_SET message."]
24089#[doc = ""]
24090#[doc = "ID: 324"]
24091#[derive(Debug, Clone, PartialEq)]
24092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24094#[cfg_attr(feature = "ts", derive(TS))]
24095#[cfg_attr(feature = "ts", ts(export))]
24096pub struct PARAM_EXT_ACK_DATA {
24097    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24098    #[cfg_attr(
24099        feature = "serde",
24100        serde(
24101            serialize_with = "crate::nulstr::serialize::<_, 16>",
24102            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24103        )
24104    )]
24105    #[cfg_attr(feature = "ts", ts(type = "string"))]
24106    pub param_id: [u8; 16],
24107    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
24108    #[cfg_attr(
24109        feature = "serde",
24110        serde(
24111            serialize_with = "crate::nulstr::serialize::<_, 128>",
24112            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
24113        )
24114    )]
24115    #[cfg_attr(feature = "ts", ts(type = "string"))]
24116    pub param_value: [u8; 128],
24117    #[doc = "Parameter type."]
24118    pub param_type: MavParamExtType,
24119    #[doc = "Result code."]
24120    pub param_result: ParamAck,
24121}
24122impl PARAM_EXT_ACK_DATA {
24123    pub const ENCODED_LEN: usize = 146usize;
24124    pub const DEFAULT: Self = Self {
24125        param_id: [0_u8; 16usize],
24126        param_value: [0_u8; 128usize],
24127        param_type: MavParamExtType::DEFAULT,
24128        param_result: ParamAck::DEFAULT,
24129    };
24130    #[cfg(feature = "arbitrary")]
24131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24132        use arbitrary::{Arbitrary, Unstructured};
24133        let mut buf = [0u8; 1024];
24134        rng.fill_bytes(&mut buf);
24135        let mut unstructured = Unstructured::new(&buf);
24136        Self::arbitrary(&mut unstructured).unwrap_or_default()
24137    }
24138}
24139impl Default for PARAM_EXT_ACK_DATA {
24140    fn default() -> Self {
24141        Self::DEFAULT.clone()
24142    }
24143}
24144impl MessageData for PARAM_EXT_ACK_DATA {
24145    type Message = MavMessage;
24146    const ID: u32 = 324u32;
24147    const NAME: &'static str = "PARAM_EXT_ACK";
24148    const EXTRA_CRC: u8 = 132u8;
24149    const ENCODED_LEN: usize = 146usize;
24150    fn deser(
24151        _version: MavlinkVersion,
24152        __input: &[u8],
24153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24154        let avail_len = __input.len();
24155        let mut payload_buf = [0; Self::ENCODED_LEN];
24156        let mut buf = if avail_len < Self::ENCODED_LEN {
24157            payload_buf[0..avail_len].copy_from_slice(__input);
24158            Bytes::new(&payload_buf)
24159        } else {
24160            Bytes::new(__input)
24161        };
24162        let mut __struct = Self::default();
24163        for v in &mut __struct.param_id {
24164            let val = buf.get_u8();
24165            *v = val;
24166        }
24167        for v in &mut __struct.param_value {
24168            let val = buf.get_u8();
24169            *v = val;
24170        }
24171        let tmp = buf.get_u8();
24172        __struct.param_type =
24173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24174                enum_type: "MavParamExtType",
24175                value: tmp as u32,
24176            })?;
24177        let tmp = buf.get_u8();
24178        __struct.param_result =
24179            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24180                enum_type: "ParamAck",
24181                value: tmp as u32,
24182            })?;
24183        Ok(__struct)
24184    }
24185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24186        let mut __tmp = BytesMut::new(bytes);
24187        #[allow(clippy::absurd_extreme_comparisons)]
24188        #[allow(unused_comparisons)]
24189        if __tmp.remaining() < Self::ENCODED_LEN {
24190            panic!(
24191                "buffer is too small (need {} bytes, but got {})",
24192                Self::ENCODED_LEN,
24193                __tmp.remaining(),
24194            )
24195        }
24196        for val in &self.param_id {
24197            __tmp.put_u8(*val);
24198        }
24199        for val in &self.param_value {
24200            __tmp.put_u8(*val);
24201        }
24202        __tmp.put_u8(self.param_type as u8);
24203        __tmp.put_u8(self.param_result as u8);
24204        if matches!(version, MavlinkVersion::V2) {
24205            let len = __tmp.len();
24206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24207        } else {
24208            __tmp.len()
24209        }
24210    }
24211}
24212#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24213#[doc = ""]
24214#[doc = "ID: 321"]
24215#[derive(Debug, Clone, PartialEq)]
24216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24218#[cfg_attr(feature = "ts", derive(TS))]
24219#[cfg_attr(feature = "ts", ts(export))]
24220pub struct PARAM_EXT_REQUEST_LIST_DATA {
24221    #[doc = "System ID"]
24222    pub target_system: u8,
24223    #[doc = "Component ID"]
24224    pub target_component: u8,
24225}
24226impl PARAM_EXT_REQUEST_LIST_DATA {
24227    pub const ENCODED_LEN: usize = 2usize;
24228    pub const DEFAULT: Self = Self {
24229        target_system: 0_u8,
24230        target_component: 0_u8,
24231    };
24232    #[cfg(feature = "arbitrary")]
24233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24234        use arbitrary::{Arbitrary, Unstructured};
24235        let mut buf = [0u8; 1024];
24236        rng.fill_bytes(&mut buf);
24237        let mut unstructured = Unstructured::new(&buf);
24238        Self::arbitrary(&mut unstructured).unwrap_or_default()
24239    }
24240}
24241impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24242    fn default() -> Self {
24243        Self::DEFAULT.clone()
24244    }
24245}
24246impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24247    type Message = MavMessage;
24248    const ID: u32 = 321u32;
24249    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24250    const EXTRA_CRC: u8 = 88u8;
24251    const ENCODED_LEN: usize = 2usize;
24252    fn deser(
24253        _version: MavlinkVersion,
24254        __input: &[u8],
24255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24256        let avail_len = __input.len();
24257        let mut payload_buf = [0; Self::ENCODED_LEN];
24258        let mut buf = if avail_len < Self::ENCODED_LEN {
24259            payload_buf[0..avail_len].copy_from_slice(__input);
24260            Bytes::new(&payload_buf)
24261        } else {
24262            Bytes::new(__input)
24263        };
24264        let mut __struct = Self::default();
24265        __struct.target_system = buf.get_u8();
24266        __struct.target_component = buf.get_u8();
24267        Ok(__struct)
24268    }
24269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24270        let mut __tmp = BytesMut::new(bytes);
24271        #[allow(clippy::absurd_extreme_comparisons)]
24272        #[allow(unused_comparisons)]
24273        if __tmp.remaining() < Self::ENCODED_LEN {
24274            panic!(
24275                "buffer is too small (need {} bytes, but got {})",
24276                Self::ENCODED_LEN,
24277                __tmp.remaining(),
24278            )
24279        }
24280        __tmp.put_u8(self.target_system);
24281        __tmp.put_u8(self.target_component);
24282        if matches!(version, MavlinkVersion::V2) {
24283            let len = __tmp.len();
24284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24285        } else {
24286            __tmp.len()
24287        }
24288    }
24289}
24290#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24291#[doc = ""]
24292#[doc = "ID: 320"]
24293#[derive(Debug, Clone, PartialEq)]
24294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24296#[cfg_attr(feature = "ts", derive(TS))]
24297#[cfg_attr(feature = "ts", ts(export))]
24298pub struct PARAM_EXT_REQUEST_READ_DATA {
24299    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24300    pub param_index: i16,
24301    #[doc = "System ID"]
24302    pub target_system: u8,
24303    #[doc = "Component ID"]
24304    pub target_component: u8,
24305    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24306    #[cfg_attr(
24307        feature = "serde",
24308        serde(
24309            serialize_with = "crate::nulstr::serialize::<_, 16>",
24310            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24311        )
24312    )]
24313    #[cfg_attr(feature = "ts", ts(type = "string"))]
24314    pub param_id: [u8; 16],
24315}
24316impl PARAM_EXT_REQUEST_READ_DATA {
24317    pub const ENCODED_LEN: usize = 20usize;
24318    pub const DEFAULT: Self = Self {
24319        param_index: 0_i16,
24320        target_system: 0_u8,
24321        target_component: 0_u8,
24322        param_id: [0_u8; 16usize],
24323    };
24324    #[cfg(feature = "arbitrary")]
24325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24326        use arbitrary::{Arbitrary, Unstructured};
24327        let mut buf = [0u8; 1024];
24328        rng.fill_bytes(&mut buf);
24329        let mut unstructured = Unstructured::new(&buf);
24330        Self::arbitrary(&mut unstructured).unwrap_or_default()
24331    }
24332}
24333impl Default for PARAM_EXT_REQUEST_READ_DATA {
24334    fn default() -> Self {
24335        Self::DEFAULT.clone()
24336    }
24337}
24338impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24339    type Message = MavMessage;
24340    const ID: u32 = 320u32;
24341    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24342    const EXTRA_CRC: u8 = 243u8;
24343    const ENCODED_LEN: usize = 20usize;
24344    fn deser(
24345        _version: MavlinkVersion,
24346        __input: &[u8],
24347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24348        let avail_len = __input.len();
24349        let mut payload_buf = [0; Self::ENCODED_LEN];
24350        let mut buf = if avail_len < Self::ENCODED_LEN {
24351            payload_buf[0..avail_len].copy_from_slice(__input);
24352            Bytes::new(&payload_buf)
24353        } else {
24354            Bytes::new(__input)
24355        };
24356        let mut __struct = Self::default();
24357        __struct.param_index = buf.get_i16_le();
24358        __struct.target_system = buf.get_u8();
24359        __struct.target_component = buf.get_u8();
24360        for v in &mut __struct.param_id {
24361            let val = buf.get_u8();
24362            *v = val;
24363        }
24364        Ok(__struct)
24365    }
24366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24367        let mut __tmp = BytesMut::new(bytes);
24368        #[allow(clippy::absurd_extreme_comparisons)]
24369        #[allow(unused_comparisons)]
24370        if __tmp.remaining() < Self::ENCODED_LEN {
24371            panic!(
24372                "buffer is too small (need {} bytes, but got {})",
24373                Self::ENCODED_LEN,
24374                __tmp.remaining(),
24375            )
24376        }
24377        __tmp.put_i16_le(self.param_index);
24378        __tmp.put_u8(self.target_system);
24379        __tmp.put_u8(self.target_component);
24380        for val in &self.param_id {
24381            __tmp.put_u8(*val);
24382        }
24383        if matches!(version, MavlinkVersion::V2) {
24384            let len = __tmp.len();
24385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24386        } else {
24387            __tmp.len()
24388        }
24389    }
24390}
24391#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24392#[doc = ""]
24393#[doc = "ID: 323"]
24394#[derive(Debug, Clone, PartialEq)]
24395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24397#[cfg_attr(feature = "ts", derive(TS))]
24398#[cfg_attr(feature = "ts", ts(export))]
24399pub struct PARAM_EXT_SET_DATA {
24400    #[doc = "System ID"]
24401    pub target_system: u8,
24402    #[doc = "Component ID"]
24403    pub target_component: u8,
24404    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24405    #[cfg_attr(
24406        feature = "serde",
24407        serde(
24408            serialize_with = "crate::nulstr::serialize::<_, 16>",
24409            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24410        )
24411    )]
24412    #[cfg_attr(feature = "ts", ts(type = "string"))]
24413    pub param_id: [u8; 16],
24414    #[doc = "Parameter value"]
24415    #[cfg_attr(
24416        feature = "serde",
24417        serde(
24418            serialize_with = "crate::nulstr::serialize::<_, 128>",
24419            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
24420        )
24421    )]
24422    #[cfg_attr(feature = "ts", ts(type = "string"))]
24423    pub param_value: [u8; 128],
24424    #[doc = "Parameter type."]
24425    pub param_type: MavParamExtType,
24426}
24427impl PARAM_EXT_SET_DATA {
24428    pub const ENCODED_LEN: usize = 147usize;
24429    pub const DEFAULT: Self = Self {
24430        target_system: 0_u8,
24431        target_component: 0_u8,
24432        param_id: [0_u8; 16usize],
24433        param_value: [0_u8; 128usize],
24434        param_type: MavParamExtType::DEFAULT,
24435    };
24436    #[cfg(feature = "arbitrary")]
24437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24438        use arbitrary::{Arbitrary, Unstructured};
24439        let mut buf = [0u8; 1024];
24440        rng.fill_bytes(&mut buf);
24441        let mut unstructured = Unstructured::new(&buf);
24442        Self::arbitrary(&mut unstructured).unwrap_or_default()
24443    }
24444}
24445impl Default for PARAM_EXT_SET_DATA {
24446    fn default() -> Self {
24447        Self::DEFAULT.clone()
24448    }
24449}
24450impl MessageData for PARAM_EXT_SET_DATA {
24451    type Message = MavMessage;
24452    const ID: u32 = 323u32;
24453    const NAME: &'static str = "PARAM_EXT_SET";
24454    const EXTRA_CRC: u8 = 78u8;
24455    const ENCODED_LEN: usize = 147usize;
24456    fn deser(
24457        _version: MavlinkVersion,
24458        __input: &[u8],
24459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24460        let avail_len = __input.len();
24461        let mut payload_buf = [0; Self::ENCODED_LEN];
24462        let mut buf = if avail_len < Self::ENCODED_LEN {
24463            payload_buf[0..avail_len].copy_from_slice(__input);
24464            Bytes::new(&payload_buf)
24465        } else {
24466            Bytes::new(__input)
24467        };
24468        let mut __struct = Self::default();
24469        __struct.target_system = buf.get_u8();
24470        __struct.target_component = buf.get_u8();
24471        for v in &mut __struct.param_id {
24472            let val = buf.get_u8();
24473            *v = val;
24474        }
24475        for v in &mut __struct.param_value {
24476            let val = buf.get_u8();
24477            *v = val;
24478        }
24479        let tmp = buf.get_u8();
24480        __struct.param_type =
24481            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24482                enum_type: "MavParamExtType",
24483                value: tmp as u32,
24484            })?;
24485        Ok(__struct)
24486    }
24487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24488        let mut __tmp = BytesMut::new(bytes);
24489        #[allow(clippy::absurd_extreme_comparisons)]
24490        #[allow(unused_comparisons)]
24491        if __tmp.remaining() < Self::ENCODED_LEN {
24492            panic!(
24493                "buffer is too small (need {} bytes, but got {})",
24494                Self::ENCODED_LEN,
24495                __tmp.remaining(),
24496            )
24497        }
24498        __tmp.put_u8(self.target_system);
24499        __tmp.put_u8(self.target_component);
24500        for val in &self.param_id {
24501            __tmp.put_u8(*val);
24502        }
24503        for val in &self.param_value {
24504            __tmp.put_u8(*val);
24505        }
24506        __tmp.put_u8(self.param_type as u8);
24507        if matches!(version, MavlinkVersion::V2) {
24508            let len = __tmp.len();
24509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24510        } else {
24511            __tmp.len()
24512        }
24513    }
24514}
24515#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24516#[doc = ""]
24517#[doc = "ID: 322"]
24518#[derive(Debug, Clone, PartialEq)]
24519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24521#[cfg_attr(feature = "ts", derive(TS))]
24522#[cfg_attr(feature = "ts", ts(export))]
24523pub struct PARAM_EXT_VALUE_DATA {
24524    #[doc = "Total number of parameters"]
24525    pub param_count: u16,
24526    #[doc = "Index of this parameter"]
24527    pub param_index: u16,
24528    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24529    #[cfg_attr(
24530        feature = "serde",
24531        serde(
24532            serialize_with = "crate::nulstr::serialize::<_, 16>",
24533            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24534        )
24535    )]
24536    #[cfg_attr(feature = "ts", ts(type = "string"))]
24537    pub param_id: [u8; 16],
24538    #[doc = "Parameter value"]
24539    #[cfg_attr(
24540        feature = "serde",
24541        serde(
24542            serialize_with = "crate::nulstr::serialize::<_, 128>",
24543            deserialize_with = "crate::nulstr::deserialize::<_, 128>"
24544        )
24545    )]
24546    #[cfg_attr(feature = "ts", ts(type = "string"))]
24547    pub param_value: [u8; 128],
24548    #[doc = "Parameter type."]
24549    pub param_type: MavParamExtType,
24550}
24551impl PARAM_EXT_VALUE_DATA {
24552    pub const ENCODED_LEN: usize = 149usize;
24553    pub const DEFAULT: Self = Self {
24554        param_count: 0_u16,
24555        param_index: 0_u16,
24556        param_id: [0_u8; 16usize],
24557        param_value: [0_u8; 128usize],
24558        param_type: MavParamExtType::DEFAULT,
24559    };
24560    #[cfg(feature = "arbitrary")]
24561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24562        use arbitrary::{Arbitrary, Unstructured};
24563        let mut buf = [0u8; 1024];
24564        rng.fill_bytes(&mut buf);
24565        let mut unstructured = Unstructured::new(&buf);
24566        Self::arbitrary(&mut unstructured).unwrap_or_default()
24567    }
24568}
24569impl Default for PARAM_EXT_VALUE_DATA {
24570    fn default() -> Self {
24571        Self::DEFAULT.clone()
24572    }
24573}
24574impl MessageData for PARAM_EXT_VALUE_DATA {
24575    type Message = MavMessage;
24576    const ID: u32 = 322u32;
24577    const NAME: &'static str = "PARAM_EXT_VALUE";
24578    const EXTRA_CRC: u8 = 243u8;
24579    const ENCODED_LEN: usize = 149usize;
24580    fn deser(
24581        _version: MavlinkVersion,
24582        __input: &[u8],
24583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24584        let avail_len = __input.len();
24585        let mut payload_buf = [0; Self::ENCODED_LEN];
24586        let mut buf = if avail_len < Self::ENCODED_LEN {
24587            payload_buf[0..avail_len].copy_from_slice(__input);
24588            Bytes::new(&payload_buf)
24589        } else {
24590            Bytes::new(__input)
24591        };
24592        let mut __struct = Self::default();
24593        __struct.param_count = buf.get_u16_le();
24594        __struct.param_index = buf.get_u16_le();
24595        for v in &mut __struct.param_id {
24596            let val = buf.get_u8();
24597            *v = val;
24598        }
24599        for v in &mut __struct.param_value {
24600            let val = buf.get_u8();
24601            *v = val;
24602        }
24603        let tmp = buf.get_u8();
24604        __struct.param_type =
24605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24606                enum_type: "MavParamExtType",
24607                value: tmp as u32,
24608            })?;
24609        Ok(__struct)
24610    }
24611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24612        let mut __tmp = BytesMut::new(bytes);
24613        #[allow(clippy::absurd_extreme_comparisons)]
24614        #[allow(unused_comparisons)]
24615        if __tmp.remaining() < Self::ENCODED_LEN {
24616            panic!(
24617                "buffer is too small (need {} bytes, but got {})",
24618                Self::ENCODED_LEN,
24619                __tmp.remaining(),
24620            )
24621        }
24622        __tmp.put_u16_le(self.param_count);
24623        __tmp.put_u16_le(self.param_index);
24624        for val in &self.param_id {
24625            __tmp.put_u8(*val);
24626        }
24627        for val in &self.param_value {
24628            __tmp.put_u8(*val);
24629        }
24630        __tmp.put_u8(self.param_type as u8);
24631        if matches!(version, MavlinkVersion::V2) {
24632            let len = __tmp.len();
24633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24634        } else {
24635            __tmp.len()
24636        }
24637    }
24638}
24639#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24640#[doc = ""]
24641#[doc = "ID: 50"]
24642#[derive(Debug, Clone, PartialEq)]
24643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24645#[cfg_attr(feature = "ts", derive(TS))]
24646#[cfg_attr(feature = "ts", ts(export))]
24647pub struct PARAM_MAP_RC_DATA {
24648    #[doc = "Initial parameter value"]
24649    pub param_value0: f32,
24650    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24651    pub scale: f32,
24652    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24653    pub param_value_min: f32,
24654    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24655    pub param_value_max: f32,
24656    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24657    pub param_index: i16,
24658    #[doc = "System ID"]
24659    pub target_system: u8,
24660    #[doc = "Component ID"]
24661    pub target_component: u8,
24662    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24663    #[cfg_attr(
24664        feature = "serde",
24665        serde(
24666            serialize_with = "crate::nulstr::serialize::<_, 16>",
24667            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24668        )
24669    )]
24670    #[cfg_attr(feature = "ts", ts(type = "string"))]
24671    pub param_id: [u8; 16],
24672    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24673    pub parameter_rc_channel_index: u8,
24674}
24675impl PARAM_MAP_RC_DATA {
24676    pub const ENCODED_LEN: usize = 37usize;
24677    pub const DEFAULT: Self = Self {
24678        param_value0: 0.0_f32,
24679        scale: 0.0_f32,
24680        param_value_min: 0.0_f32,
24681        param_value_max: 0.0_f32,
24682        param_index: 0_i16,
24683        target_system: 0_u8,
24684        target_component: 0_u8,
24685        param_id: [0_u8; 16usize],
24686        parameter_rc_channel_index: 0_u8,
24687    };
24688    #[cfg(feature = "arbitrary")]
24689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24690        use arbitrary::{Arbitrary, Unstructured};
24691        let mut buf = [0u8; 1024];
24692        rng.fill_bytes(&mut buf);
24693        let mut unstructured = Unstructured::new(&buf);
24694        Self::arbitrary(&mut unstructured).unwrap_or_default()
24695    }
24696}
24697impl Default for PARAM_MAP_RC_DATA {
24698    fn default() -> Self {
24699        Self::DEFAULT.clone()
24700    }
24701}
24702impl MessageData for PARAM_MAP_RC_DATA {
24703    type Message = MavMessage;
24704    const ID: u32 = 50u32;
24705    const NAME: &'static str = "PARAM_MAP_RC";
24706    const EXTRA_CRC: u8 = 78u8;
24707    const ENCODED_LEN: usize = 37usize;
24708    fn deser(
24709        _version: MavlinkVersion,
24710        __input: &[u8],
24711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24712        let avail_len = __input.len();
24713        let mut payload_buf = [0; Self::ENCODED_LEN];
24714        let mut buf = if avail_len < Self::ENCODED_LEN {
24715            payload_buf[0..avail_len].copy_from_slice(__input);
24716            Bytes::new(&payload_buf)
24717        } else {
24718            Bytes::new(__input)
24719        };
24720        let mut __struct = Self::default();
24721        __struct.param_value0 = buf.get_f32_le();
24722        __struct.scale = buf.get_f32_le();
24723        __struct.param_value_min = buf.get_f32_le();
24724        __struct.param_value_max = buf.get_f32_le();
24725        __struct.param_index = buf.get_i16_le();
24726        __struct.target_system = buf.get_u8();
24727        __struct.target_component = buf.get_u8();
24728        for v in &mut __struct.param_id {
24729            let val = buf.get_u8();
24730            *v = val;
24731        }
24732        __struct.parameter_rc_channel_index = buf.get_u8();
24733        Ok(__struct)
24734    }
24735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24736        let mut __tmp = BytesMut::new(bytes);
24737        #[allow(clippy::absurd_extreme_comparisons)]
24738        #[allow(unused_comparisons)]
24739        if __tmp.remaining() < Self::ENCODED_LEN {
24740            panic!(
24741                "buffer is too small (need {} bytes, but got {})",
24742                Self::ENCODED_LEN,
24743                __tmp.remaining(),
24744            )
24745        }
24746        __tmp.put_f32_le(self.param_value0);
24747        __tmp.put_f32_le(self.scale);
24748        __tmp.put_f32_le(self.param_value_min);
24749        __tmp.put_f32_le(self.param_value_max);
24750        __tmp.put_i16_le(self.param_index);
24751        __tmp.put_u8(self.target_system);
24752        __tmp.put_u8(self.target_component);
24753        for val in &self.param_id {
24754            __tmp.put_u8(*val);
24755        }
24756        __tmp.put_u8(self.parameter_rc_channel_index);
24757        if matches!(version, MavlinkVersion::V2) {
24758            let len = __tmp.len();
24759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24760        } else {
24761            __tmp.len()
24762        }
24763    }
24764}
24765#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24766#[doc = ""]
24767#[doc = "ID: 21"]
24768#[derive(Debug, Clone, PartialEq)]
24769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24771#[cfg_attr(feature = "ts", derive(TS))]
24772#[cfg_attr(feature = "ts", ts(export))]
24773pub struct PARAM_REQUEST_LIST_DATA {
24774    #[doc = "System ID"]
24775    pub target_system: u8,
24776    #[doc = "Component ID"]
24777    pub target_component: u8,
24778}
24779impl PARAM_REQUEST_LIST_DATA {
24780    pub const ENCODED_LEN: usize = 2usize;
24781    pub const DEFAULT: Self = Self {
24782        target_system: 0_u8,
24783        target_component: 0_u8,
24784    };
24785    #[cfg(feature = "arbitrary")]
24786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24787        use arbitrary::{Arbitrary, Unstructured};
24788        let mut buf = [0u8; 1024];
24789        rng.fill_bytes(&mut buf);
24790        let mut unstructured = Unstructured::new(&buf);
24791        Self::arbitrary(&mut unstructured).unwrap_or_default()
24792    }
24793}
24794impl Default for PARAM_REQUEST_LIST_DATA {
24795    fn default() -> Self {
24796        Self::DEFAULT.clone()
24797    }
24798}
24799impl MessageData for PARAM_REQUEST_LIST_DATA {
24800    type Message = MavMessage;
24801    const ID: u32 = 21u32;
24802    const NAME: &'static str = "PARAM_REQUEST_LIST";
24803    const EXTRA_CRC: u8 = 159u8;
24804    const ENCODED_LEN: usize = 2usize;
24805    fn deser(
24806        _version: MavlinkVersion,
24807        __input: &[u8],
24808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24809        let avail_len = __input.len();
24810        let mut payload_buf = [0; Self::ENCODED_LEN];
24811        let mut buf = if avail_len < Self::ENCODED_LEN {
24812            payload_buf[0..avail_len].copy_from_slice(__input);
24813            Bytes::new(&payload_buf)
24814        } else {
24815            Bytes::new(__input)
24816        };
24817        let mut __struct = Self::default();
24818        __struct.target_system = buf.get_u8();
24819        __struct.target_component = buf.get_u8();
24820        Ok(__struct)
24821    }
24822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24823        let mut __tmp = BytesMut::new(bytes);
24824        #[allow(clippy::absurd_extreme_comparisons)]
24825        #[allow(unused_comparisons)]
24826        if __tmp.remaining() < Self::ENCODED_LEN {
24827            panic!(
24828                "buffer is too small (need {} bytes, but got {})",
24829                Self::ENCODED_LEN,
24830                __tmp.remaining(),
24831            )
24832        }
24833        __tmp.put_u8(self.target_system);
24834        __tmp.put_u8(self.target_component);
24835        if matches!(version, MavlinkVersion::V2) {
24836            let len = __tmp.len();
24837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24838        } else {
24839            __tmp.len()
24840        }
24841    }
24842}
24843#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24844#[doc = ""]
24845#[doc = "ID: 20"]
24846#[derive(Debug, Clone, PartialEq)]
24847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24849#[cfg_attr(feature = "ts", derive(TS))]
24850#[cfg_attr(feature = "ts", ts(export))]
24851pub struct PARAM_REQUEST_READ_DATA {
24852    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24853    pub param_index: i16,
24854    #[doc = "System ID"]
24855    pub target_system: u8,
24856    #[doc = "Component ID"]
24857    pub target_component: u8,
24858    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24859    #[cfg_attr(
24860        feature = "serde",
24861        serde(
24862            serialize_with = "crate::nulstr::serialize::<_, 16>",
24863            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24864        )
24865    )]
24866    #[cfg_attr(feature = "ts", ts(type = "string"))]
24867    pub param_id: [u8; 16],
24868}
24869impl PARAM_REQUEST_READ_DATA {
24870    pub const ENCODED_LEN: usize = 20usize;
24871    pub const DEFAULT: Self = Self {
24872        param_index: 0_i16,
24873        target_system: 0_u8,
24874        target_component: 0_u8,
24875        param_id: [0_u8; 16usize],
24876    };
24877    #[cfg(feature = "arbitrary")]
24878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24879        use arbitrary::{Arbitrary, Unstructured};
24880        let mut buf = [0u8; 1024];
24881        rng.fill_bytes(&mut buf);
24882        let mut unstructured = Unstructured::new(&buf);
24883        Self::arbitrary(&mut unstructured).unwrap_or_default()
24884    }
24885}
24886impl Default for PARAM_REQUEST_READ_DATA {
24887    fn default() -> Self {
24888        Self::DEFAULT.clone()
24889    }
24890}
24891impl MessageData for PARAM_REQUEST_READ_DATA {
24892    type Message = MavMessage;
24893    const ID: u32 = 20u32;
24894    const NAME: &'static str = "PARAM_REQUEST_READ";
24895    const EXTRA_CRC: u8 = 214u8;
24896    const ENCODED_LEN: usize = 20usize;
24897    fn deser(
24898        _version: MavlinkVersion,
24899        __input: &[u8],
24900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24901        let avail_len = __input.len();
24902        let mut payload_buf = [0; Self::ENCODED_LEN];
24903        let mut buf = if avail_len < Self::ENCODED_LEN {
24904            payload_buf[0..avail_len].copy_from_slice(__input);
24905            Bytes::new(&payload_buf)
24906        } else {
24907            Bytes::new(__input)
24908        };
24909        let mut __struct = Self::default();
24910        __struct.param_index = buf.get_i16_le();
24911        __struct.target_system = buf.get_u8();
24912        __struct.target_component = buf.get_u8();
24913        for v in &mut __struct.param_id {
24914            let val = buf.get_u8();
24915            *v = val;
24916        }
24917        Ok(__struct)
24918    }
24919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24920        let mut __tmp = BytesMut::new(bytes);
24921        #[allow(clippy::absurd_extreme_comparisons)]
24922        #[allow(unused_comparisons)]
24923        if __tmp.remaining() < Self::ENCODED_LEN {
24924            panic!(
24925                "buffer is too small (need {} bytes, but got {})",
24926                Self::ENCODED_LEN,
24927                __tmp.remaining(),
24928            )
24929        }
24930        __tmp.put_i16_le(self.param_index);
24931        __tmp.put_u8(self.target_system);
24932        __tmp.put_u8(self.target_component);
24933        for val in &self.param_id {
24934            __tmp.put_u8(*val);
24935        }
24936        if matches!(version, MavlinkVersion::V2) {
24937            let len = __tmp.len();
24938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24939        } else {
24940            __tmp.len()
24941        }
24942    }
24943}
24944#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24945#[doc = ""]
24946#[doc = "ID: 23"]
24947#[derive(Debug, Clone, PartialEq)]
24948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24950#[cfg_attr(feature = "ts", derive(TS))]
24951#[cfg_attr(feature = "ts", ts(export))]
24952pub struct PARAM_SET_DATA {
24953    #[doc = "Onboard parameter value"]
24954    pub param_value: f32,
24955    #[doc = "System ID"]
24956    pub target_system: u8,
24957    #[doc = "Component ID"]
24958    pub target_component: u8,
24959    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24960    #[cfg_attr(
24961        feature = "serde",
24962        serde(
24963            serialize_with = "crate::nulstr::serialize::<_, 16>",
24964            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
24965        )
24966    )]
24967    #[cfg_attr(feature = "ts", ts(type = "string"))]
24968    pub param_id: [u8; 16],
24969    #[doc = "Onboard parameter type."]
24970    pub param_type: MavParamType,
24971}
24972impl PARAM_SET_DATA {
24973    pub const ENCODED_LEN: usize = 23usize;
24974    pub const DEFAULT: Self = Self {
24975        param_value: 0.0_f32,
24976        target_system: 0_u8,
24977        target_component: 0_u8,
24978        param_id: [0_u8; 16usize],
24979        param_type: MavParamType::DEFAULT,
24980    };
24981    #[cfg(feature = "arbitrary")]
24982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24983        use arbitrary::{Arbitrary, Unstructured};
24984        let mut buf = [0u8; 1024];
24985        rng.fill_bytes(&mut buf);
24986        let mut unstructured = Unstructured::new(&buf);
24987        Self::arbitrary(&mut unstructured).unwrap_or_default()
24988    }
24989}
24990impl Default for PARAM_SET_DATA {
24991    fn default() -> Self {
24992        Self::DEFAULT.clone()
24993    }
24994}
24995impl MessageData for PARAM_SET_DATA {
24996    type Message = MavMessage;
24997    const ID: u32 = 23u32;
24998    const NAME: &'static str = "PARAM_SET";
24999    const EXTRA_CRC: u8 = 168u8;
25000    const ENCODED_LEN: usize = 23usize;
25001    fn deser(
25002        _version: MavlinkVersion,
25003        __input: &[u8],
25004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25005        let avail_len = __input.len();
25006        let mut payload_buf = [0; Self::ENCODED_LEN];
25007        let mut buf = if avail_len < Self::ENCODED_LEN {
25008            payload_buf[0..avail_len].copy_from_slice(__input);
25009            Bytes::new(&payload_buf)
25010        } else {
25011            Bytes::new(__input)
25012        };
25013        let mut __struct = Self::default();
25014        __struct.param_value = buf.get_f32_le();
25015        __struct.target_system = buf.get_u8();
25016        __struct.target_component = buf.get_u8();
25017        for v in &mut __struct.param_id {
25018            let val = buf.get_u8();
25019            *v = val;
25020        }
25021        let tmp = buf.get_u8();
25022        __struct.param_type =
25023            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25024                enum_type: "MavParamType",
25025                value: tmp as u32,
25026            })?;
25027        Ok(__struct)
25028    }
25029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25030        let mut __tmp = BytesMut::new(bytes);
25031        #[allow(clippy::absurd_extreme_comparisons)]
25032        #[allow(unused_comparisons)]
25033        if __tmp.remaining() < Self::ENCODED_LEN {
25034            panic!(
25035                "buffer is too small (need {} bytes, but got {})",
25036                Self::ENCODED_LEN,
25037                __tmp.remaining(),
25038            )
25039        }
25040        __tmp.put_f32_le(self.param_value);
25041        __tmp.put_u8(self.target_system);
25042        __tmp.put_u8(self.target_component);
25043        for val in &self.param_id {
25044            __tmp.put_u8(*val);
25045        }
25046        __tmp.put_u8(self.param_type as u8);
25047        if matches!(version, MavlinkVersion::V2) {
25048            let len = __tmp.len();
25049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25050        } else {
25051            __tmp.len()
25052        }
25053    }
25054}
25055#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25056#[doc = ""]
25057#[doc = "ID: 22"]
25058#[derive(Debug, Clone, PartialEq)]
25059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25061#[cfg_attr(feature = "ts", derive(TS))]
25062#[cfg_attr(feature = "ts", ts(export))]
25063pub struct PARAM_VALUE_DATA {
25064    #[doc = "Onboard parameter value"]
25065    pub param_value: f32,
25066    #[doc = "Total number of onboard parameters"]
25067    pub param_count: u16,
25068    #[doc = "Index of this onboard parameter"]
25069    pub param_index: u16,
25070    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25071    #[cfg_attr(
25072        feature = "serde",
25073        serde(
25074            serialize_with = "crate::nulstr::serialize::<_, 16>",
25075            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
25076        )
25077    )]
25078    #[cfg_attr(feature = "ts", ts(type = "string"))]
25079    pub param_id: [u8; 16],
25080    #[doc = "Onboard parameter type."]
25081    pub param_type: MavParamType,
25082}
25083impl PARAM_VALUE_DATA {
25084    pub const ENCODED_LEN: usize = 25usize;
25085    pub const DEFAULT: Self = Self {
25086        param_value: 0.0_f32,
25087        param_count: 0_u16,
25088        param_index: 0_u16,
25089        param_id: [0_u8; 16usize],
25090        param_type: MavParamType::DEFAULT,
25091    };
25092    #[cfg(feature = "arbitrary")]
25093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25094        use arbitrary::{Arbitrary, Unstructured};
25095        let mut buf = [0u8; 1024];
25096        rng.fill_bytes(&mut buf);
25097        let mut unstructured = Unstructured::new(&buf);
25098        Self::arbitrary(&mut unstructured).unwrap_or_default()
25099    }
25100}
25101impl Default for PARAM_VALUE_DATA {
25102    fn default() -> Self {
25103        Self::DEFAULT.clone()
25104    }
25105}
25106impl MessageData for PARAM_VALUE_DATA {
25107    type Message = MavMessage;
25108    const ID: u32 = 22u32;
25109    const NAME: &'static str = "PARAM_VALUE";
25110    const EXTRA_CRC: u8 = 220u8;
25111    const ENCODED_LEN: usize = 25usize;
25112    fn deser(
25113        _version: MavlinkVersion,
25114        __input: &[u8],
25115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25116        let avail_len = __input.len();
25117        let mut payload_buf = [0; Self::ENCODED_LEN];
25118        let mut buf = if avail_len < Self::ENCODED_LEN {
25119            payload_buf[0..avail_len].copy_from_slice(__input);
25120            Bytes::new(&payload_buf)
25121        } else {
25122            Bytes::new(__input)
25123        };
25124        let mut __struct = Self::default();
25125        __struct.param_value = buf.get_f32_le();
25126        __struct.param_count = buf.get_u16_le();
25127        __struct.param_index = buf.get_u16_le();
25128        for v in &mut __struct.param_id {
25129            let val = buf.get_u8();
25130            *v = val;
25131        }
25132        let tmp = buf.get_u8();
25133        __struct.param_type =
25134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25135                enum_type: "MavParamType",
25136                value: tmp as u32,
25137            })?;
25138        Ok(__struct)
25139    }
25140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25141        let mut __tmp = BytesMut::new(bytes);
25142        #[allow(clippy::absurd_extreme_comparisons)]
25143        #[allow(unused_comparisons)]
25144        if __tmp.remaining() < Self::ENCODED_LEN {
25145            panic!(
25146                "buffer is too small (need {} bytes, but got {})",
25147                Self::ENCODED_LEN,
25148                __tmp.remaining(),
25149            )
25150        }
25151        __tmp.put_f32_le(self.param_value);
25152        __tmp.put_u16_le(self.param_count);
25153        __tmp.put_u16_le(self.param_index);
25154        for val in &self.param_id {
25155            __tmp.put_u8(*val);
25156        }
25157        __tmp.put_u8(self.param_type as u8);
25158        if matches!(version, MavlinkVersion::V2) {
25159            let len = __tmp.len();
25160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25161        } else {
25162            __tmp.len()
25163        }
25164    }
25165}
25166#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
25167#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
25168#[doc = ""]
25169#[doc = "ID: 4"]
25170#[derive(Debug, Clone, PartialEq)]
25171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25173#[cfg_attr(feature = "ts", derive(TS))]
25174#[cfg_attr(feature = "ts", ts(export))]
25175pub struct PING_DATA {
25176    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25177    pub time_usec: u64,
25178    #[doc = "PING sequence"]
25179    pub seq: u32,
25180    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
25181    pub target_system: u8,
25182    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
25183    pub target_component: u8,
25184}
25185impl PING_DATA {
25186    pub const ENCODED_LEN: usize = 14usize;
25187    pub const DEFAULT: Self = Self {
25188        time_usec: 0_u64,
25189        seq: 0_u32,
25190        target_system: 0_u8,
25191        target_component: 0_u8,
25192    };
25193    #[cfg(feature = "arbitrary")]
25194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25195        use arbitrary::{Arbitrary, Unstructured};
25196        let mut buf = [0u8; 1024];
25197        rng.fill_bytes(&mut buf);
25198        let mut unstructured = Unstructured::new(&buf);
25199        Self::arbitrary(&mut unstructured).unwrap_or_default()
25200    }
25201}
25202impl Default for PING_DATA {
25203    fn default() -> Self {
25204        Self::DEFAULT.clone()
25205    }
25206}
25207impl MessageData for PING_DATA {
25208    type Message = MavMessage;
25209    const ID: u32 = 4u32;
25210    const NAME: &'static str = "PING";
25211    const EXTRA_CRC: u8 = 237u8;
25212    const ENCODED_LEN: usize = 14usize;
25213    fn deser(
25214        _version: MavlinkVersion,
25215        __input: &[u8],
25216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25217        let avail_len = __input.len();
25218        let mut payload_buf = [0; Self::ENCODED_LEN];
25219        let mut buf = if avail_len < Self::ENCODED_LEN {
25220            payload_buf[0..avail_len].copy_from_slice(__input);
25221            Bytes::new(&payload_buf)
25222        } else {
25223            Bytes::new(__input)
25224        };
25225        let mut __struct = Self::default();
25226        __struct.time_usec = buf.get_u64_le();
25227        __struct.seq = buf.get_u32_le();
25228        __struct.target_system = buf.get_u8();
25229        __struct.target_component = buf.get_u8();
25230        Ok(__struct)
25231    }
25232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25233        let mut __tmp = BytesMut::new(bytes);
25234        #[allow(clippy::absurd_extreme_comparisons)]
25235        #[allow(unused_comparisons)]
25236        if __tmp.remaining() < Self::ENCODED_LEN {
25237            panic!(
25238                "buffer is too small (need {} bytes, but got {})",
25239                Self::ENCODED_LEN,
25240                __tmp.remaining(),
25241            )
25242        }
25243        __tmp.put_u64_le(self.time_usec);
25244        __tmp.put_u32_le(self.seq);
25245        __tmp.put_u8(self.target_system);
25246        __tmp.put_u8(self.target_component);
25247        if matches!(version, MavlinkVersion::V2) {
25248            let len = __tmp.len();
25249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25250        } else {
25251            __tmp.len()
25252        }
25253    }
25254}
25255#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25256#[doc = "Control vehicle tone generation (buzzer)."]
25257#[doc = ""]
25258#[doc = "ID: 258"]
25259#[derive(Debug, Clone, PartialEq)]
25260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25262#[cfg_attr(feature = "ts", derive(TS))]
25263#[cfg_attr(feature = "ts", ts(export))]
25264pub struct PLAY_TUNE_DATA {
25265    #[doc = "System ID"]
25266    pub target_system: u8,
25267    #[doc = "Component ID"]
25268    pub target_component: u8,
25269    #[doc = "tune in board specific format"]
25270    #[cfg_attr(
25271        feature = "serde",
25272        serde(
25273            serialize_with = "crate::nulstr::serialize::<_, 30>",
25274            deserialize_with = "crate::nulstr::deserialize::<_, 30>"
25275        )
25276    )]
25277    #[cfg_attr(feature = "ts", ts(type = "string"))]
25278    pub tune: [u8; 30],
25279    #[doc = "tune extension (appended to tune)"]
25280    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25281    #[cfg_attr(
25282        feature = "serde",
25283        serde(
25284            serialize_with = "crate::nulstr::serialize::<_, 200>",
25285            deserialize_with = "crate::nulstr::deserialize::<_, 200>"
25286        )
25287    )]
25288    #[cfg_attr(feature = "ts", ts(type = "string"))]
25289    pub tune2: [u8; 200],
25290}
25291impl PLAY_TUNE_DATA {
25292    pub const ENCODED_LEN: usize = 232usize;
25293    pub const DEFAULT: Self = Self {
25294        target_system: 0_u8,
25295        target_component: 0_u8,
25296        tune: [0_u8; 30usize],
25297        tune2: [0_u8; 200usize],
25298    };
25299    #[cfg(feature = "arbitrary")]
25300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25301        use arbitrary::{Arbitrary, Unstructured};
25302        let mut buf = [0u8; 1024];
25303        rng.fill_bytes(&mut buf);
25304        let mut unstructured = Unstructured::new(&buf);
25305        Self::arbitrary(&mut unstructured).unwrap_or_default()
25306    }
25307}
25308impl Default for PLAY_TUNE_DATA {
25309    fn default() -> Self {
25310        Self::DEFAULT.clone()
25311    }
25312}
25313impl MessageData for PLAY_TUNE_DATA {
25314    type Message = MavMessage;
25315    const ID: u32 = 258u32;
25316    const NAME: &'static str = "PLAY_TUNE";
25317    const EXTRA_CRC: u8 = 187u8;
25318    const ENCODED_LEN: usize = 232usize;
25319    fn deser(
25320        _version: MavlinkVersion,
25321        __input: &[u8],
25322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25323        let avail_len = __input.len();
25324        let mut payload_buf = [0; Self::ENCODED_LEN];
25325        let mut buf = if avail_len < Self::ENCODED_LEN {
25326            payload_buf[0..avail_len].copy_from_slice(__input);
25327            Bytes::new(&payload_buf)
25328        } else {
25329            Bytes::new(__input)
25330        };
25331        let mut __struct = Self::default();
25332        __struct.target_system = buf.get_u8();
25333        __struct.target_component = buf.get_u8();
25334        for v in &mut __struct.tune {
25335            let val = buf.get_u8();
25336            *v = val;
25337        }
25338        for v in &mut __struct.tune2 {
25339            let val = buf.get_u8();
25340            *v = val;
25341        }
25342        Ok(__struct)
25343    }
25344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25345        let mut __tmp = BytesMut::new(bytes);
25346        #[allow(clippy::absurd_extreme_comparisons)]
25347        #[allow(unused_comparisons)]
25348        if __tmp.remaining() < Self::ENCODED_LEN {
25349            panic!(
25350                "buffer is too small (need {} bytes, but got {})",
25351                Self::ENCODED_LEN,
25352                __tmp.remaining(),
25353            )
25354        }
25355        __tmp.put_u8(self.target_system);
25356        __tmp.put_u8(self.target_component);
25357        for val in &self.tune {
25358            __tmp.put_u8(*val);
25359        }
25360        if matches!(version, MavlinkVersion::V2) {
25361            for val in &self.tune2 {
25362                __tmp.put_u8(*val);
25363            }
25364            let len = __tmp.len();
25365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25366        } else {
25367            __tmp.len()
25368        }
25369    }
25370}
25371#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25372#[doc = ""]
25373#[doc = "ID: 400"]
25374#[derive(Debug, Clone, PartialEq)]
25375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25377#[cfg_attr(feature = "ts", derive(TS))]
25378#[cfg_attr(feature = "ts", ts(export))]
25379pub struct PLAY_TUNE_V2_DATA {
25380    #[doc = "Tune format"]
25381    pub format: TuneFormat,
25382    #[doc = "System ID"]
25383    pub target_system: u8,
25384    #[doc = "Component ID"]
25385    pub target_component: u8,
25386    #[doc = "Tune definition as a NULL-terminated string."]
25387    #[cfg_attr(
25388        feature = "serde",
25389        serde(
25390            serialize_with = "crate::nulstr::serialize::<_, 248>",
25391            deserialize_with = "crate::nulstr::deserialize::<_, 248>"
25392        )
25393    )]
25394    #[cfg_attr(feature = "ts", ts(type = "string"))]
25395    pub tune: [u8; 248],
25396}
25397impl PLAY_TUNE_V2_DATA {
25398    pub const ENCODED_LEN: usize = 254usize;
25399    pub const DEFAULT: Self = Self {
25400        format: TuneFormat::DEFAULT,
25401        target_system: 0_u8,
25402        target_component: 0_u8,
25403        tune: [0_u8; 248usize],
25404    };
25405    #[cfg(feature = "arbitrary")]
25406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25407        use arbitrary::{Arbitrary, Unstructured};
25408        let mut buf = [0u8; 1024];
25409        rng.fill_bytes(&mut buf);
25410        let mut unstructured = Unstructured::new(&buf);
25411        Self::arbitrary(&mut unstructured).unwrap_or_default()
25412    }
25413}
25414impl Default for PLAY_TUNE_V2_DATA {
25415    fn default() -> Self {
25416        Self::DEFAULT.clone()
25417    }
25418}
25419impl MessageData for PLAY_TUNE_V2_DATA {
25420    type Message = MavMessage;
25421    const ID: u32 = 400u32;
25422    const NAME: &'static str = "PLAY_TUNE_V2";
25423    const EXTRA_CRC: u8 = 110u8;
25424    const ENCODED_LEN: usize = 254usize;
25425    fn deser(
25426        _version: MavlinkVersion,
25427        __input: &[u8],
25428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25429        let avail_len = __input.len();
25430        let mut payload_buf = [0; Self::ENCODED_LEN];
25431        let mut buf = if avail_len < Self::ENCODED_LEN {
25432            payload_buf[0..avail_len].copy_from_slice(__input);
25433            Bytes::new(&payload_buf)
25434        } else {
25435            Bytes::new(__input)
25436        };
25437        let mut __struct = Self::default();
25438        let tmp = buf.get_u32_le();
25439        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25440            ::mavlink_core::error::ParserError::InvalidEnum {
25441                enum_type: "TuneFormat",
25442                value: tmp as u32,
25443            },
25444        )?;
25445        __struct.target_system = buf.get_u8();
25446        __struct.target_component = buf.get_u8();
25447        for v in &mut __struct.tune {
25448            let val = buf.get_u8();
25449            *v = val;
25450        }
25451        Ok(__struct)
25452    }
25453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25454        let mut __tmp = BytesMut::new(bytes);
25455        #[allow(clippy::absurd_extreme_comparisons)]
25456        #[allow(unused_comparisons)]
25457        if __tmp.remaining() < Self::ENCODED_LEN {
25458            panic!(
25459                "buffer is too small (need {} bytes, but got {})",
25460                Self::ENCODED_LEN,
25461                __tmp.remaining(),
25462            )
25463        }
25464        __tmp.put_u32_le(self.format as u32);
25465        __tmp.put_u8(self.target_system);
25466        __tmp.put_u8(self.target_component);
25467        for val in &self.tune {
25468            __tmp.put_u8(*val);
25469        }
25470        if matches!(version, MavlinkVersion::V2) {
25471            let len = __tmp.len();
25472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25473        } else {
25474            __tmp.len()
25475        }
25476    }
25477}
25478#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25479#[doc = ""]
25480#[doc = "ID: 87"]
25481#[derive(Debug, Clone, PartialEq)]
25482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25484#[cfg_attr(feature = "ts", derive(TS))]
25485#[cfg_attr(feature = "ts", ts(export))]
25486pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25487    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25488    pub time_boot_ms: u32,
25489    #[doc = "Latitude in WGS84 frame"]
25490    pub lat_int: i32,
25491    #[doc = "Longitude in WGS84 frame"]
25492    pub lon_int: i32,
25493    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25494    pub alt: f32,
25495    #[doc = "X velocity in NED frame"]
25496    pub vx: f32,
25497    #[doc = "Y velocity in NED frame"]
25498    pub vy: f32,
25499    #[doc = "Z velocity in NED frame"]
25500    pub vz: f32,
25501    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25502    pub afx: f32,
25503    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25504    pub afy: f32,
25505    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25506    pub afz: f32,
25507    #[doc = "yaw setpoint"]
25508    pub yaw: f32,
25509    #[doc = "yaw rate setpoint"]
25510    pub yaw_rate: f32,
25511    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25512    pub type_mask: PositionTargetTypemask,
25513    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25514    pub coordinate_frame: MavFrame,
25515}
25516impl POSITION_TARGET_GLOBAL_INT_DATA {
25517    pub const ENCODED_LEN: usize = 51usize;
25518    pub const DEFAULT: Self = Self {
25519        time_boot_ms: 0_u32,
25520        lat_int: 0_i32,
25521        lon_int: 0_i32,
25522        alt: 0.0_f32,
25523        vx: 0.0_f32,
25524        vy: 0.0_f32,
25525        vz: 0.0_f32,
25526        afx: 0.0_f32,
25527        afy: 0.0_f32,
25528        afz: 0.0_f32,
25529        yaw: 0.0_f32,
25530        yaw_rate: 0.0_f32,
25531        type_mask: PositionTargetTypemask::DEFAULT,
25532        coordinate_frame: MavFrame::DEFAULT,
25533    };
25534    #[cfg(feature = "arbitrary")]
25535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25536        use arbitrary::{Arbitrary, Unstructured};
25537        let mut buf = [0u8; 1024];
25538        rng.fill_bytes(&mut buf);
25539        let mut unstructured = Unstructured::new(&buf);
25540        Self::arbitrary(&mut unstructured).unwrap_or_default()
25541    }
25542}
25543impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25544    fn default() -> Self {
25545        Self::DEFAULT.clone()
25546    }
25547}
25548impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25549    type Message = MavMessage;
25550    const ID: u32 = 87u32;
25551    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25552    const EXTRA_CRC: u8 = 150u8;
25553    const ENCODED_LEN: usize = 51usize;
25554    fn deser(
25555        _version: MavlinkVersion,
25556        __input: &[u8],
25557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25558        let avail_len = __input.len();
25559        let mut payload_buf = [0; Self::ENCODED_LEN];
25560        let mut buf = if avail_len < Self::ENCODED_LEN {
25561            payload_buf[0..avail_len].copy_from_slice(__input);
25562            Bytes::new(&payload_buf)
25563        } else {
25564            Bytes::new(__input)
25565        };
25566        let mut __struct = Self::default();
25567        __struct.time_boot_ms = buf.get_u32_le();
25568        __struct.lat_int = buf.get_i32_le();
25569        __struct.lon_int = buf.get_i32_le();
25570        __struct.alt = buf.get_f32_le();
25571        __struct.vx = buf.get_f32_le();
25572        __struct.vy = buf.get_f32_le();
25573        __struct.vz = buf.get_f32_le();
25574        __struct.afx = buf.get_f32_le();
25575        __struct.afy = buf.get_f32_le();
25576        __struct.afz = buf.get_f32_le();
25577        __struct.yaw = buf.get_f32_le();
25578        __struct.yaw_rate = buf.get_f32_le();
25579        let tmp = buf.get_u16_le();
25580        __struct.type_mask = PositionTargetTypemask::from_bits(
25581            tmp & PositionTargetTypemask::all().bits(),
25582        )
25583        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25584            flag_type: "PositionTargetTypemask",
25585            value: tmp as u32,
25586        })?;
25587        let tmp = buf.get_u8();
25588        __struct.coordinate_frame =
25589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25590                enum_type: "MavFrame",
25591                value: tmp as u32,
25592            })?;
25593        Ok(__struct)
25594    }
25595    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25596        let mut __tmp = BytesMut::new(bytes);
25597        #[allow(clippy::absurd_extreme_comparisons)]
25598        #[allow(unused_comparisons)]
25599        if __tmp.remaining() < Self::ENCODED_LEN {
25600            panic!(
25601                "buffer is too small (need {} bytes, but got {})",
25602                Self::ENCODED_LEN,
25603                __tmp.remaining(),
25604            )
25605        }
25606        __tmp.put_u32_le(self.time_boot_ms);
25607        __tmp.put_i32_le(self.lat_int);
25608        __tmp.put_i32_le(self.lon_int);
25609        __tmp.put_f32_le(self.alt);
25610        __tmp.put_f32_le(self.vx);
25611        __tmp.put_f32_le(self.vy);
25612        __tmp.put_f32_le(self.vz);
25613        __tmp.put_f32_le(self.afx);
25614        __tmp.put_f32_le(self.afy);
25615        __tmp.put_f32_le(self.afz);
25616        __tmp.put_f32_le(self.yaw);
25617        __tmp.put_f32_le(self.yaw_rate);
25618        __tmp.put_u16_le(self.type_mask.bits());
25619        __tmp.put_u8(self.coordinate_frame as u8);
25620        if matches!(version, MavlinkVersion::V2) {
25621            let len = __tmp.len();
25622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25623        } else {
25624            __tmp.len()
25625        }
25626    }
25627}
25628#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25629#[doc = ""]
25630#[doc = "ID: 85"]
25631#[derive(Debug, Clone, PartialEq)]
25632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25634#[cfg_attr(feature = "ts", derive(TS))]
25635#[cfg_attr(feature = "ts", ts(export))]
25636pub struct POSITION_TARGET_LOCAL_NED_DATA {
25637    #[doc = "Timestamp (time since system boot)."]
25638    pub time_boot_ms: u32,
25639    #[doc = "X Position in NED frame"]
25640    pub x: f32,
25641    #[doc = "Y Position in NED frame"]
25642    pub y: f32,
25643    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25644    pub z: f32,
25645    #[doc = "X velocity in NED frame"]
25646    pub vx: f32,
25647    #[doc = "Y velocity in NED frame"]
25648    pub vy: f32,
25649    #[doc = "Z velocity in NED frame"]
25650    pub vz: f32,
25651    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25652    pub afx: f32,
25653    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25654    pub afy: f32,
25655    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25656    pub afz: f32,
25657    #[doc = "yaw setpoint"]
25658    pub yaw: f32,
25659    #[doc = "yaw rate setpoint"]
25660    pub yaw_rate: f32,
25661    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25662    pub type_mask: PositionTargetTypemask,
25663    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25664    pub coordinate_frame: MavFrame,
25665}
25666impl POSITION_TARGET_LOCAL_NED_DATA {
25667    pub const ENCODED_LEN: usize = 51usize;
25668    pub const DEFAULT: Self = Self {
25669        time_boot_ms: 0_u32,
25670        x: 0.0_f32,
25671        y: 0.0_f32,
25672        z: 0.0_f32,
25673        vx: 0.0_f32,
25674        vy: 0.0_f32,
25675        vz: 0.0_f32,
25676        afx: 0.0_f32,
25677        afy: 0.0_f32,
25678        afz: 0.0_f32,
25679        yaw: 0.0_f32,
25680        yaw_rate: 0.0_f32,
25681        type_mask: PositionTargetTypemask::DEFAULT,
25682        coordinate_frame: MavFrame::DEFAULT,
25683    };
25684    #[cfg(feature = "arbitrary")]
25685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25686        use arbitrary::{Arbitrary, Unstructured};
25687        let mut buf = [0u8; 1024];
25688        rng.fill_bytes(&mut buf);
25689        let mut unstructured = Unstructured::new(&buf);
25690        Self::arbitrary(&mut unstructured).unwrap_or_default()
25691    }
25692}
25693impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25694    fn default() -> Self {
25695        Self::DEFAULT.clone()
25696    }
25697}
25698impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25699    type Message = MavMessage;
25700    const ID: u32 = 85u32;
25701    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25702    const EXTRA_CRC: u8 = 140u8;
25703    const ENCODED_LEN: usize = 51usize;
25704    fn deser(
25705        _version: MavlinkVersion,
25706        __input: &[u8],
25707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25708        let avail_len = __input.len();
25709        let mut payload_buf = [0; Self::ENCODED_LEN];
25710        let mut buf = if avail_len < Self::ENCODED_LEN {
25711            payload_buf[0..avail_len].copy_from_slice(__input);
25712            Bytes::new(&payload_buf)
25713        } else {
25714            Bytes::new(__input)
25715        };
25716        let mut __struct = Self::default();
25717        __struct.time_boot_ms = buf.get_u32_le();
25718        __struct.x = buf.get_f32_le();
25719        __struct.y = buf.get_f32_le();
25720        __struct.z = buf.get_f32_le();
25721        __struct.vx = buf.get_f32_le();
25722        __struct.vy = buf.get_f32_le();
25723        __struct.vz = buf.get_f32_le();
25724        __struct.afx = buf.get_f32_le();
25725        __struct.afy = buf.get_f32_le();
25726        __struct.afz = buf.get_f32_le();
25727        __struct.yaw = buf.get_f32_le();
25728        __struct.yaw_rate = buf.get_f32_le();
25729        let tmp = buf.get_u16_le();
25730        __struct.type_mask = PositionTargetTypemask::from_bits(
25731            tmp & PositionTargetTypemask::all().bits(),
25732        )
25733        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25734            flag_type: "PositionTargetTypemask",
25735            value: tmp as u32,
25736        })?;
25737        let tmp = buf.get_u8();
25738        __struct.coordinate_frame =
25739            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25740                enum_type: "MavFrame",
25741                value: tmp as u32,
25742            })?;
25743        Ok(__struct)
25744    }
25745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25746        let mut __tmp = BytesMut::new(bytes);
25747        #[allow(clippy::absurd_extreme_comparisons)]
25748        #[allow(unused_comparisons)]
25749        if __tmp.remaining() < Self::ENCODED_LEN {
25750            panic!(
25751                "buffer is too small (need {} bytes, but got {})",
25752                Self::ENCODED_LEN,
25753                __tmp.remaining(),
25754            )
25755        }
25756        __tmp.put_u32_le(self.time_boot_ms);
25757        __tmp.put_f32_le(self.x);
25758        __tmp.put_f32_le(self.y);
25759        __tmp.put_f32_le(self.z);
25760        __tmp.put_f32_le(self.vx);
25761        __tmp.put_f32_le(self.vy);
25762        __tmp.put_f32_le(self.vz);
25763        __tmp.put_f32_le(self.afx);
25764        __tmp.put_f32_le(self.afy);
25765        __tmp.put_f32_le(self.afz);
25766        __tmp.put_f32_le(self.yaw);
25767        __tmp.put_f32_le(self.yaw_rate);
25768        __tmp.put_u16_le(self.type_mask.bits());
25769        __tmp.put_u8(self.coordinate_frame as u8);
25770        if matches!(version, MavlinkVersion::V2) {
25771            let len = __tmp.len();
25772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25773        } else {
25774            __tmp.len()
25775        }
25776    }
25777}
25778#[doc = "Power supply status."]
25779#[doc = ""]
25780#[doc = "ID: 125"]
25781#[derive(Debug, Clone, PartialEq)]
25782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25784#[cfg_attr(feature = "ts", derive(TS))]
25785#[cfg_attr(feature = "ts", ts(export))]
25786pub struct POWER_STATUS_DATA {
25787    #[doc = "5V rail voltage."]
25788    pub Vcc: u16,
25789    #[doc = "Servo rail voltage."]
25790    pub Vservo: u16,
25791    #[doc = "Bitmap of power supply status flags."]
25792    pub flags: MavPowerStatus,
25793}
25794impl POWER_STATUS_DATA {
25795    pub const ENCODED_LEN: usize = 6usize;
25796    pub const DEFAULT: Self = Self {
25797        Vcc: 0_u16,
25798        Vservo: 0_u16,
25799        flags: MavPowerStatus::DEFAULT,
25800    };
25801    #[cfg(feature = "arbitrary")]
25802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25803        use arbitrary::{Arbitrary, Unstructured};
25804        let mut buf = [0u8; 1024];
25805        rng.fill_bytes(&mut buf);
25806        let mut unstructured = Unstructured::new(&buf);
25807        Self::arbitrary(&mut unstructured).unwrap_or_default()
25808    }
25809}
25810impl Default for POWER_STATUS_DATA {
25811    fn default() -> Self {
25812        Self::DEFAULT.clone()
25813    }
25814}
25815impl MessageData for POWER_STATUS_DATA {
25816    type Message = MavMessage;
25817    const ID: u32 = 125u32;
25818    const NAME: &'static str = "POWER_STATUS";
25819    const EXTRA_CRC: u8 = 203u8;
25820    const ENCODED_LEN: usize = 6usize;
25821    fn deser(
25822        _version: MavlinkVersion,
25823        __input: &[u8],
25824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25825        let avail_len = __input.len();
25826        let mut payload_buf = [0; Self::ENCODED_LEN];
25827        let mut buf = if avail_len < Self::ENCODED_LEN {
25828            payload_buf[0..avail_len].copy_from_slice(__input);
25829            Bytes::new(&payload_buf)
25830        } else {
25831            Bytes::new(__input)
25832        };
25833        let mut __struct = Self::default();
25834        __struct.Vcc = buf.get_u16_le();
25835        __struct.Vservo = buf.get_u16_le();
25836        let tmp = buf.get_u16_le();
25837        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25838            ::mavlink_core::error::ParserError::InvalidFlag {
25839                flag_type: "MavPowerStatus",
25840                value: tmp as u32,
25841            },
25842        )?;
25843        Ok(__struct)
25844    }
25845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25846        let mut __tmp = BytesMut::new(bytes);
25847        #[allow(clippy::absurd_extreme_comparisons)]
25848        #[allow(unused_comparisons)]
25849        if __tmp.remaining() < Self::ENCODED_LEN {
25850            panic!(
25851                "buffer is too small (need {} bytes, but got {})",
25852                Self::ENCODED_LEN,
25853                __tmp.remaining(),
25854            )
25855        }
25856        __tmp.put_u16_le(self.Vcc);
25857        __tmp.put_u16_le(self.Vservo);
25858        __tmp.put_u16_le(self.flags.bits());
25859        if matches!(version, MavlinkVersion::V2) {
25860            let len = __tmp.len();
25861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25862        } else {
25863            __tmp.len()
25864        }
25865    }
25866}
25867#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25868#[doc = ""]
25869#[doc = "ID: 300"]
25870#[derive(Debug, Clone, PartialEq)]
25871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25873#[cfg_attr(feature = "ts", derive(TS))]
25874#[cfg_attr(feature = "ts", ts(export))]
25875pub struct PROTOCOL_VERSION_DATA {
25876    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25877    pub version: u16,
25878    #[doc = "Minimum MAVLink version supported"]
25879    pub min_version: u16,
25880    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25881    pub max_version: u16,
25882    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25885    pub spec_version_hash: [u8; 8],
25886    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25888    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25889    pub library_version_hash: [u8; 8],
25890}
25891impl PROTOCOL_VERSION_DATA {
25892    pub const ENCODED_LEN: usize = 22usize;
25893    pub const DEFAULT: Self = Self {
25894        version: 0_u16,
25895        min_version: 0_u16,
25896        max_version: 0_u16,
25897        spec_version_hash: [0_u8; 8usize],
25898        library_version_hash: [0_u8; 8usize],
25899    };
25900    #[cfg(feature = "arbitrary")]
25901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25902        use arbitrary::{Arbitrary, Unstructured};
25903        let mut buf = [0u8; 1024];
25904        rng.fill_bytes(&mut buf);
25905        let mut unstructured = Unstructured::new(&buf);
25906        Self::arbitrary(&mut unstructured).unwrap_or_default()
25907    }
25908}
25909impl Default for PROTOCOL_VERSION_DATA {
25910    fn default() -> Self {
25911        Self::DEFAULT.clone()
25912    }
25913}
25914impl MessageData for PROTOCOL_VERSION_DATA {
25915    type Message = MavMessage;
25916    const ID: u32 = 300u32;
25917    const NAME: &'static str = "PROTOCOL_VERSION";
25918    const EXTRA_CRC: u8 = 217u8;
25919    const ENCODED_LEN: usize = 22usize;
25920    fn deser(
25921        _version: MavlinkVersion,
25922        __input: &[u8],
25923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25924        let avail_len = __input.len();
25925        let mut payload_buf = [0; Self::ENCODED_LEN];
25926        let mut buf = if avail_len < Self::ENCODED_LEN {
25927            payload_buf[0..avail_len].copy_from_slice(__input);
25928            Bytes::new(&payload_buf)
25929        } else {
25930            Bytes::new(__input)
25931        };
25932        let mut __struct = Self::default();
25933        __struct.version = buf.get_u16_le();
25934        __struct.min_version = buf.get_u16_le();
25935        __struct.max_version = buf.get_u16_le();
25936        for v in &mut __struct.spec_version_hash {
25937            let val = buf.get_u8();
25938            *v = val;
25939        }
25940        for v in &mut __struct.library_version_hash {
25941            let val = buf.get_u8();
25942            *v = val;
25943        }
25944        Ok(__struct)
25945    }
25946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25947        let mut __tmp = BytesMut::new(bytes);
25948        #[allow(clippy::absurd_extreme_comparisons)]
25949        #[allow(unused_comparisons)]
25950        if __tmp.remaining() < Self::ENCODED_LEN {
25951            panic!(
25952                "buffer is too small (need {} bytes, but got {})",
25953                Self::ENCODED_LEN,
25954                __tmp.remaining(),
25955            )
25956        }
25957        __tmp.put_u16_le(self.version);
25958        __tmp.put_u16_le(self.min_version);
25959        __tmp.put_u16_le(self.max_version);
25960        for val in &self.spec_version_hash {
25961            __tmp.put_u8(*val);
25962        }
25963        for val in &self.library_version_hash {
25964            __tmp.put_u8(*val);
25965        }
25966        if matches!(version, MavlinkVersion::V2) {
25967            let len = __tmp.len();
25968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25969        } else {
25970            __tmp.len()
25971        }
25972    }
25973}
25974#[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
25975#[doc = ""]
25976#[doc = "ID: 420"]
25977#[derive(Debug, Clone, PartialEq)]
25978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25980#[cfg_attr(feature = "ts", derive(TS))]
25981#[cfg_attr(feature = "ts", ts(export))]
25982pub struct RADIO_RC_CHANNELS_DATA {
25983    #[doc = "Time when the data in the channels field were last updated (time since boot in the receiver's time domain)."]
25984    pub time_last_update_ms: u32,
25985    #[doc = "Radio RC channels status flags."]
25986    pub flags: RadioRcChannelsFlags,
25987    #[doc = "System ID (ID of target system, normally flight controller)."]
25988    pub target_system: u8,
25989    #[doc = "Component ID (normally 0 for broadcast)."]
25990    pub target_component: u8,
25991    #[doc = "Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message."]
25992    pub count: u8,
25993    #[doc = "RC channels.         Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500.         Channels with indexes equal or above count should be set to 0, to benefit from MAVLink's trailing-zero trimming."]
25994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25997    pub channels: [i16; 32],
25998}
25999impl RADIO_RC_CHANNELS_DATA {
26000    pub const ENCODED_LEN: usize = 73usize;
26001    pub const DEFAULT: Self = Self {
26002        time_last_update_ms: 0_u32,
26003        flags: RadioRcChannelsFlags::DEFAULT,
26004        target_system: 0_u8,
26005        target_component: 0_u8,
26006        count: 0_u8,
26007        channels: [0_i16; 32usize],
26008    };
26009    #[cfg(feature = "arbitrary")]
26010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26011        use arbitrary::{Arbitrary, Unstructured};
26012        let mut buf = [0u8; 1024];
26013        rng.fill_bytes(&mut buf);
26014        let mut unstructured = Unstructured::new(&buf);
26015        Self::arbitrary(&mut unstructured).unwrap_or_default()
26016    }
26017}
26018impl Default for RADIO_RC_CHANNELS_DATA {
26019    fn default() -> Self {
26020        Self::DEFAULT.clone()
26021    }
26022}
26023impl MessageData for RADIO_RC_CHANNELS_DATA {
26024    type Message = MavMessage;
26025    const ID: u32 = 420u32;
26026    const NAME: &'static str = "RADIO_RC_CHANNELS";
26027    const EXTRA_CRC: u8 = 20u8;
26028    const ENCODED_LEN: usize = 73usize;
26029    fn deser(
26030        _version: MavlinkVersion,
26031        __input: &[u8],
26032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26033        let avail_len = __input.len();
26034        let mut payload_buf = [0; Self::ENCODED_LEN];
26035        let mut buf = if avail_len < Self::ENCODED_LEN {
26036            payload_buf[0..avail_len].copy_from_slice(__input);
26037            Bytes::new(&payload_buf)
26038        } else {
26039            Bytes::new(__input)
26040        };
26041        let mut __struct = Self::default();
26042        __struct.time_last_update_ms = buf.get_u32_le();
26043        let tmp = buf.get_u16_le();
26044        __struct.flags = RadioRcChannelsFlags::from_bits(tmp & RadioRcChannelsFlags::all().bits())
26045            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26046                flag_type: "RadioRcChannelsFlags",
26047                value: tmp as u32,
26048            })?;
26049        __struct.target_system = buf.get_u8();
26050        __struct.target_component = buf.get_u8();
26051        __struct.count = buf.get_u8();
26052        for v in &mut __struct.channels {
26053            let val = buf.get_i16_le();
26054            *v = val;
26055        }
26056        Ok(__struct)
26057    }
26058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26059        let mut __tmp = BytesMut::new(bytes);
26060        #[allow(clippy::absurd_extreme_comparisons)]
26061        #[allow(unused_comparisons)]
26062        if __tmp.remaining() < Self::ENCODED_LEN {
26063            panic!(
26064                "buffer is too small (need {} bytes, but got {})",
26065                Self::ENCODED_LEN,
26066                __tmp.remaining(),
26067            )
26068        }
26069        __tmp.put_u32_le(self.time_last_update_ms);
26070        __tmp.put_u16_le(self.flags.bits());
26071        __tmp.put_u8(self.target_system);
26072        __tmp.put_u8(self.target_component);
26073        __tmp.put_u8(self.count);
26074        if matches!(version, MavlinkVersion::V2) {
26075            for val in &self.channels {
26076                __tmp.put_i16_le(*val);
26077            }
26078            let len = __tmp.len();
26079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26080        } else {
26081            __tmp.len()
26082        }
26083    }
26084}
26085#[doc = "Status generated by radio and injected into MAVLink stream."]
26086#[doc = ""]
26087#[doc = "ID: 109"]
26088#[derive(Debug, Clone, PartialEq)]
26089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26091#[cfg_attr(feature = "ts", derive(TS))]
26092#[cfg_attr(feature = "ts", ts(export))]
26093pub struct RADIO_STATUS_DATA {
26094    #[doc = "Count of radio packet receive errors (since boot)."]
26095    pub rxerrors: u16,
26096    #[doc = "Count of error corrected radio packets (since boot)."]
26097    pub fixed: u16,
26098    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26099    pub rssi: u8,
26100    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26101    pub remrssi: u8,
26102    #[doc = "Remaining free transmitter buffer space."]
26103    pub txbuf: u8,
26104    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26105    pub noise: u8,
26106    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26107    pub remnoise: u8,
26108}
26109impl RADIO_STATUS_DATA {
26110    pub const ENCODED_LEN: usize = 9usize;
26111    pub const DEFAULT: Self = Self {
26112        rxerrors: 0_u16,
26113        fixed: 0_u16,
26114        rssi: 0_u8,
26115        remrssi: 0_u8,
26116        txbuf: 0_u8,
26117        noise: 0_u8,
26118        remnoise: 0_u8,
26119    };
26120    #[cfg(feature = "arbitrary")]
26121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26122        use arbitrary::{Arbitrary, Unstructured};
26123        let mut buf = [0u8; 1024];
26124        rng.fill_bytes(&mut buf);
26125        let mut unstructured = Unstructured::new(&buf);
26126        Self::arbitrary(&mut unstructured).unwrap_or_default()
26127    }
26128}
26129impl Default for RADIO_STATUS_DATA {
26130    fn default() -> Self {
26131        Self::DEFAULT.clone()
26132    }
26133}
26134impl MessageData for RADIO_STATUS_DATA {
26135    type Message = MavMessage;
26136    const ID: u32 = 109u32;
26137    const NAME: &'static str = "RADIO_STATUS";
26138    const EXTRA_CRC: u8 = 185u8;
26139    const ENCODED_LEN: usize = 9usize;
26140    fn deser(
26141        _version: MavlinkVersion,
26142        __input: &[u8],
26143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26144        let avail_len = __input.len();
26145        let mut payload_buf = [0; Self::ENCODED_LEN];
26146        let mut buf = if avail_len < Self::ENCODED_LEN {
26147            payload_buf[0..avail_len].copy_from_slice(__input);
26148            Bytes::new(&payload_buf)
26149        } else {
26150            Bytes::new(__input)
26151        };
26152        let mut __struct = Self::default();
26153        __struct.rxerrors = buf.get_u16_le();
26154        __struct.fixed = buf.get_u16_le();
26155        __struct.rssi = buf.get_u8();
26156        __struct.remrssi = buf.get_u8();
26157        __struct.txbuf = buf.get_u8();
26158        __struct.noise = buf.get_u8();
26159        __struct.remnoise = buf.get_u8();
26160        Ok(__struct)
26161    }
26162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26163        let mut __tmp = BytesMut::new(bytes);
26164        #[allow(clippy::absurd_extreme_comparisons)]
26165        #[allow(unused_comparisons)]
26166        if __tmp.remaining() < Self::ENCODED_LEN {
26167            panic!(
26168                "buffer is too small (need {} bytes, but got {})",
26169                Self::ENCODED_LEN,
26170                __tmp.remaining(),
26171            )
26172        }
26173        __tmp.put_u16_le(self.rxerrors);
26174        __tmp.put_u16_le(self.fixed);
26175        __tmp.put_u8(self.rssi);
26176        __tmp.put_u8(self.remrssi);
26177        __tmp.put_u8(self.txbuf);
26178        __tmp.put_u8(self.noise);
26179        __tmp.put_u8(self.remnoise);
26180        if matches!(version, MavlinkVersion::V2) {
26181            let len = __tmp.len();
26182            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26183        } else {
26184            __tmp.len()
26185        }
26186    }
26187}
26188#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
26189#[doc = ""]
26190#[doc = "ID: 27"]
26191#[derive(Debug, Clone, PartialEq)]
26192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26194#[cfg_attr(feature = "ts", derive(TS))]
26195#[cfg_attr(feature = "ts", ts(export))]
26196pub struct RAW_IMU_DATA {
26197    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26198    pub time_usec: u64,
26199    #[doc = "X acceleration (raw)"]
26200    pub xacc: i16,
26201    #[doc = "Y acceleration (raw)"]
26202    pub yacc: i16,
26203    #[doc = "Z acceleration (raw)"]
26204    pub zacc: i16,
26205    #[doc = "Angular speed around X axis (raw)"]
26206    pub xgyro: i16,
26207    #[doc = "Angular speed around Y axis (raw)"]
26208    pub ygyro: i16,
26209    #[doc = "Angular speed around Z axis (raw)"]
26210    pub zgyro: i16,
26211    #[doc = "X Magnetic field (raw)"]
26212    pub xmag: i16,
26213    #[doc = "Y Magnetic field (raw)"]
26214    pub ymag: i16,
26215    #[doc = "Z Magnetic field (raw)"]
26216    pub zmag: i16,
26217    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
26218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26219    pub id: u8,
26220    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26222    pub temperature: i16,
26223}
26224impl RAW_IMU_DATA {
26225    pub const ENCODED_LEN: usize = 29usize;
26226    pub const DEFAULT: Self = Self {
26227        time_usec: 0_u64,
26228        xacc: 0_i16,
26229        yacc: 0_i16,
26230        zacc: 0_i16,
26231        xgyro: 0_i16,
26232        ygyro: 0_i16,
26233        zgyro: 0_i16,
26234        xmag: 0_i16,
26235        ymag: 0_i16,
26236        zmag: 0_i16,
26237        id: 0_u8,
26238        temperature: 0_i16,
26239    };
26240    #[cfg(feature = "arbitrary")]
26241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26242        use arbitrary::{Arbitrary, Unstructured};
26243        let mut buf = [0u8; 1024];
26244        rng.fill_bytes(&mut buf);
26245        let mut unstructured = Unstructured::new(&buf);
26246        Self::arbitrary(&mut unstructured).unwrap_or_default()
26247    }
26248}
26249impl Default for RAW_IMU_DATA {
26250    fn default() -> Self {
26251        Self::DEFAULT.clone()
26252    }
26253}
26254impl MessageData for RAW_IMU_DATA {
26255    type Message = MavMessage;
26256    const ID: u32 = 27u32;
26257    const NAME: &'static str = "RAW_IMU";
26258    const EXTRA_CRC: u8 = 144u8;
26259    const ENCODED_LEN: usize = 29usize;
26260    fn deser(
26261        _version: MavlinkVersion,
26262        __input: &[u8],
26263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26264        let avail_len = __input.len();
26265        let mut payload_buf = [0; Self::ENCODED_LEN];
26266        let mut buf = if avail_len < Self::ENCODED_LEN {
26267            payload_buf[0..avail_len].copy_from_slice(__input);
26268            Bytes::new(&payload_buf)
26269        } else {
26270            Bytes::new(__input)
26271        };
26272        let mut __struct = Self::default();
26273        __struct.time_usec = buf.get_u64_le();
26274        __struct.xacc = buf.get_i16_le();
26275        __struct.yacc = buf.get_i16_le();
26276        __struct.zacc = buf.get_i16_le();
26277        __struct.xgyro = buf.get_i16_le();
26278        __struct.ygyro = buf.get_i16_le();
26279        __struct.zgyro = buf.get_i16_le();
26280        __struct.xmag = buf.get_i16_le();
26281        __struct.ymag = buf.get_i16_le();
26282        __struct.zmag = buf.get_i16_le();
26283        __struct.id = buf.get_u8();
26284        __struct.temperature = buf.get_i16_le();
26285        Ok(__struct)
26286    }
26287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26288        let mut __tmp = BytesMut::new(bytes);
26289        #[allow(clippy::absurd_extreme_comparisons)]
26290        #[allow(unused_comparisons)]
26291        if __tmp.remaining() < Self::ENCODED_LEN {
26292            panic!(
26293                "buffer is too small (need {} bytes, but got {})",
26294                Self::ENCODED_LEN,
26295                __tmp.remaining(),
26296            )
26297        }
26298        __tmp.put_u64_le(self.time_usec);
26299        __tmp.put_i16_le(self.xacc);
26300        __tmp.put_i16_le(self.yacc);
26301        __tmp.put_i16_le(self.zacc);
26302        __tmp.put_i16_le(self.xgyro);
26303        __tmp.put_i16_le(self.ygyro);
26304        __tmp.put_i16_le(self.zgyro);
26305        __tmp.put_i16_le(self.xmag);
26306        __tmp.put_i16_le(self.ymag);
26307        __tmp.put_i16_le(self.zmag);
26308        if matches!(version, MavlinkVersion::V2) {
26309            __tmp.put_u8(self.id);
26310            __tmp.put_i16_le(self.temperature);
26311            let len = __tmp.len();
26312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26313        } else {
26314            __tmp.len()
26315        }
26316    }
26317}
26318#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26319#[doc = ""]
26320#[doc = "ID: 28"]
26321#[derive(Debug, Clone, PartialEq)]
26322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26324#[cfg_attr(feature = "ts", derive(TS))]
26325#[cfg_attr(feature = "ts", ts(export))]
26326pub struct RAW_PRESSURE_DATA {
26327    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26328    pub time_usec: u64,
26329    #[doc = "Absolute pressure (raw)"]
26330    pub press_abs: i16,
26331    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26332    pub press_diff1: i16,
26333    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26334    pub press_diff2: i16,
26335    #[doc = "Raw Temperature measurement (raw)"]
26336    pub temperature: i16,
26337}
26338impl RAW_PRESSURE_DATA {
26339    pub const ENCODED_LEN: usize = 16usize;
26340    pub const DEFAULT: Self = Self {
26341        time_usec: 0_u64,
26342        press_abs: 0_i16,
26343        press_diff1: 0_i16,
26344        press_diff2: 0_i16,
26345        temperature: 0_i16,
26346    };
26347    #[cfg(feature = "arbitrary")]
26348    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26349        use arbitrary::{Arbitrary, Unstructured};
26350        let mut buf = [0u8; 1024];
26351        rng.fill_bytes(&mut buf);
26352        let mut unstructured = Unstructured::new(&buf);
26353        Self::arbitrary(&mut unstructured).unwrap_or_default()
26354    }
26355}
26356impl Default for RAW_PRESSURE_DATA {
26357    fn default() -> Self {
26358        Self::DEFAULT.clone()
26359    }
26360}
26361impl MessageData for RAW_PRESSURE_DATA {
26362    type Message = MavMessage;
26363    const ID: u32 = 28u32;
26364    const NAME: &'static str = "RAW_PRESSURE";
26365    const EXTRA_CRC: u8 = 67u8;
26366    const ENCODED_LEN: usize = 16usize;
26367    fn deser(
26368        _version: MavlinkVersion,
26369        __input: &[u8],
26370    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26371        let avail_len = __input.len();
26372        let mut payload_buf = [0; Self::ENCODED_LEN];
26373        let mut buf = if avail_len < Self::ENCODED_LEN {
26374            payload_buf[0..avail_len].copy_from_slice(__input);
26375            Bytes::new(&payload_buf)
26376        } else {
26377            Bytes::new(__input)
26378        };
26379        let mut __struct = Self::default();
26380        __struct.time_usec = buf.get_u64_le();
26381        __struct.press_abs = buf.get_i16_le();
26382        __struct.press_diff1 = buf.get_i16_le();
26383        __struct.press_diff2 = buf.get_i16_le();
26384        __struct.temperature = buf.get_i16_le();
26385        Ok(__struct)
26386    }
26387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26388        let mut __tmp = BytesMut::new(bytes);
26389        #[allow(clippy::absurd_extreme_comparisons)]
26390        #[allow(unused_comparisons)]
26391        if __tmp.remaining() < Self::ENCODED_LEN {
26392            panic!(
26393                "buffer is too small (need {} bytes, but got {})",
26394                Self::ENCODED_LEN,
26395                __tmp.remaining(),
26396            )
26397        }
26398        __tmp.put_u64_le(self.time_usec);
26399        __tmp.put_i16_le(self.press_abs);
26400        __tmp.put_i16_le(self.press_diff1);
26401        __tmp.put_i16_le(self.press_diff2);
26402        __tmp.put_i16_le(self.temperature);
26403        if matches!(version, MavlinkVersion::V2) {
26404            let len = __tmp.len();
26405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26406        } else {
26407            __tmp.len()
26408        }
26409    }
26410}
26411#[doc = "RPM sensor data message."]
26412#[doc = ""]
26413#[doc = "ID: 339"]
26414#[derive(Debug, Clone, PartialEq)]
26415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26417#[cfg_attr(feature = "ts", derive(TS))]
26418#[cfg_attr(feature = "ts", ts(export))]
26419pub struct RAW_RPM_DATA {
26420    #[doc = "Indicated rate"]
26421    pub frequency: f32,
26422    #[doc = "Index of this RPM sensor (0-indexed)"]
26423    pub index: u8,
26424}
26425impl RAW_RPM_DATA {
26426    pub const ENCODED_LEN: usize = 5usize;
26427    pub const DEFAULT: Self = Self {
26428        frequency: 0.0_f32,
26429        index: 0_u8,
26430    };
26431    #[cfg(feature = "arbitrary")]
26432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26433        use arbitrary::{Arbitrary, Unstructured};
26434        let mut buf = [0u8; 1024];
26435        rng.fill_bytes(&mut buf);
26436        let mut unstructured = Unstructured::new(&buf);
26437        Self::arbitrary(&mut unstructured).unwrap_or_default()
26438    }
26439}
26440impl Default for RAW_RPM_DATA {
26441    fn default() -> Self {
26442        Self::DEFAULT.clone()
26443    }
26444}
26445impl MessageData for RAW_RPM_DATA {
26446    type Message = MavMessage;
26447    const ID: u32 = 339u32;
26448    const NAME: &'static str = "RAW_RPM";
26449    const EXTRA_CRC: u8 = 199u8;
26450    const ENCODED_LEN: usize = 5usize;
26451    fn deser(
26452        _version: MavlinkVersion,
26453        __input: &[u8],
26454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26455        let avail_len = __input.len();
26456        let mut payload_buf = [0; Self::ENCODED_LEN];
26457        let mut buf = if avail_len < Self::ENCODED_LEN {
26458            payload_buf[0..avail_len].copy_from_slice(__input);
26459            Bytes::new(&payload_buf)
26460        } else {
26461            Bytes::new(__input)
26462        };
26463        let mut __struct = Self::default();
26464        __struct.frequency = buf.get_f32_le();
26465        __struct.index = buf.get_u8();
26466        Ok(__struct)
26467    }
26468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26469        let mut __tmp = BytesMut::new(bytes);
26470        #[allow(clippy::absurd_extreme_comparisons)]
26471        #[allow(unused_comparisons)]
26472        if __tmp.remaining() < Self::ENCODED_LEN {
26473            panic!(
26474                "buffer is too small (need {} bytes, but got {})",
26475                Self::ENCODED_LEN,
26476                __tmp.remaining(),
26477            )
26478        }
26479        __tmp.put_f32_le(self.frequency);
26480        __tmp.put_u8(self.index);
26481        if matches!(version, MavlinkVersion::V2) {
26482            let len = __tmp.len();
26483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26484        } else {
26485            __tmp.len()
26486        }
26487    }
26488}
26489#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26490#[doc = ""]
26491#[doc = "ID: 65"]
26492#[derive(Debug, Clone, PartialEq)]
26493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26495#[cfg_attr(feature = "ts", derive(TS))]
26496#[cfg_attr(feature = "ts", ts(export))]
26497pub struct RC_CHANNELS_DATA {
26498    #[doc = "Timestamp (time since system boot)."]
26499    pub time_boot_ms: u32,
26500    #[doc = "RC channel 1 value."]
26501    pub chan1_raw: u16,
26502    #[doc = "RC channel 2 value."]
26503    pub chan2_raw: u16,
26504    #[doc = "RC channel 3 value."]
26505    pub chan3_raw: u16,
26506    #[doc = "RC channel 4 value."]
26507    pub chan4_raw: u16,
26508    #[doc = "RC channel 5 value."]
26509    pub chan5_raw: u16,
26510    #[doc = "RC channel 6 value."]
26511    pub chan6_raw: u16,
26512    #[doc = "RC channel 7 value."]
26513    pub chan7_raw: u16,
26514    #[doc = "RC channel 8 value."]
26515    pub chan8_raw: u16,
26516    #[doc = "RC channel 9 value."]
26517    pub chan9_raw: u16,
26518    #[doc = "RC channel 10 value."]
26519    pub chan10_raw: u16,
26520    #[doc = "RC channel 11 value."]
26521    pub chan11_raw: u16,
26522    #[doc = "RC channel 12 value."]
26523    pub chan12_raw: u16,
26524    #[doc = "RC channel 13 value."]
26525    pub chan13_raw: u16,
26526    #[doc = "RC channel 14 value."]
26527    pub chan14_raw: u16,
26528    #[doc = "RC channel 15 value."]
26529    pub chan15_raw: u16,
26530    #[doc = "RC channel 16 value."]
26531    pub chan16_raw: u16,
26532    #[doc = "RC channel 17 value."]
26533    pub chan17_raw: u16,
26534    #[doc = "RC channel 18 value."]
26535    pub chan18_raw: u16,
26536    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26537    pub chancount: u8,
26538    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26539    pub rssi: u8,
26540}
26541impl RC_CHANNELS_DATA {
26542    pub const ENCODED_LEN: usize = 42usize;
26543    pub const DEFAULT: Self = Self {
26544        time_boot_ms: 0_u32,
26545        chan1_raw: 0_u16,
26546        chan2_raw: 0_u16,
26547        chan3_raw: 0_u16,
26548        chan4_raw: 0_u16,
26549        chan5_raw: 0_u16,
26550        chan6_raw: 0_u16,
26551        chan7_raw: 0_u16,
26552        chan8_raw: 0_u16,
26553        chan9_raw: 0_u16,
26554        chan10_raw: 0_u16,
26555        chan11_raw: 0_u16,
26556        chan12_raw: 0_u16,
26557        chan13_raw: 0_u16,
26558        chan14_raw: 0_u16,
26559        chan15_raw: 0_u16,
26560        chan16_raw: 0_u16,
26561        chan17_raw: 0_u16,
26562        chan18_raw: 0_u16,
26563        chancount: 0_u8,
26564        rssi: 0_u8,
26565    };
26566    #[cfg(feature = "arbitrary")]
26567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26568        use arbitrary::{Arbitrary, Unstructured};
26569        let mut buf = [0u8; 1024];
26570        rng.fill_bytes(&mut buf);
26571        let mut unstructured = Unstructured::new(&buf);
26572        Self::arbitrary(&mut unstructured).unwrap_or_default()
26573    }
26574}
26575impl Default for RC_CHANNELS_DATA {
26576    fn default() -> Self {
26577        Self::DEFAULT.clone()
26578    }
26579}
26580impl MessageData for RC_CHANNELS_DATA {
26581    type Message = MavMessage;
26582    const ID: u32 = 65u32;
26583    const NAME: &'static str = "RC_CHANNELS";
26584    const EXTRA_CRC: u8 = 118u8;
26585    const ENCODED_LEN: usize = 42usize;
26586    fn deser(
26587        _version: MavlinkVersion,
26588        __input: &[u8],
26589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26590        let avail_len = __input.len();
26591        let mut payload_buf = [0; Self::ENCODED_LEN];
26592        let mut buf = if avail_len < Self::ENCODED_LEN {
26593            payload_buf[0..avail_len].copy_from_slice(__input);
26594            Bytes::new(&payload_buf)
26595        } else {
26596            Bytes::new(__input)
26597        };
26598        let mut __struct = Self::default();
26599        __struct.time_boot_ms = buf.get_u32_le();
26600        __struct.chan1_raw = buf.get_u16_le();
26601        __struct.chan2_raw = buf.get_u16_le();
26602        __struct.chan3_raw = buf.get_u16_le();
26603        __struct.chan4_raw = buf.get_u16_le();
26604        __struct.chan5_raw = buf.get_u16_le();
26605        __struct.chan6_raw = buf.get_u16_le();
26606        __struct.chan7_raw = buf.get_u16_le();
26607        __struct.chan8_raw = buf.get_u16_le();
26608        __struct.chan9_raw = buf.get_u16_le();
26609        __struct.chan10_raw = buf.get_u16_le();
26610        __struct.chan11_raw = buf.get_u16_le();
26611        __struct.chan12_raw = buf.get_u16_le();
26612        __struct.chan13_raw = buf.get_u16_le();
26613        __struct.chan14_raw = buf.get_u16_le();
26614        __struct.chan15_raw = buf.get_u16_le();
26615        __struct.chan16_raw = buf.get_u16_le();
26616        __struct.chan17_raw = buf.get_u16_le();
26617        __struct.chan18_raw = buf.get_u16_le();
26618        __struct.chancount = buf.get_u8();
26619        __struct.rssi = buf.get_u8();
26620        Ok(__struct)
26621    }
26622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26623        let mut __tmp = BytesMut::new(bytes);
26624        #[allow(clippy::absurd_extreme_comparisons)]
26625        #[allow(unused_comparisons)]
26626        if __tmp.remaining() < Self::ENCODED_LEN {
26627            panic!(
26628                "buffer is too small (need {} bytes, but got {})",
26629                Self::ENCODED_LEN,
26630                __tmp.remaining(),
26631            )
26632        }
26633        __tmp.put_u32_le(self.time_boot_ms);
26634        __tmp.put_u16_le(self.chan1_raw);
26635        __tmp.put_u16_le(self.chan2_raw);
26636        __tmp.put_u16_le(self.chan3_raw);
26637        __tmp.put_u16_le(self.chan4_raw);
26638        __tmp.put_u16_le(self.chan5_raw);
26639        __tmp.put_u16_le(self.chan6_raw);
26640        __tmp.put_u16_le(self.chan7_raw);
26641        __tmp.put_u16_le(self.chan8_raw);
26642        __tmp.put_u16_le(self.chan9_raw);
26643        __tmp.put_u16_le(self.chan10_raw);
26644        __tmp.put_u16_le(self.chan11_raw);
26645        __tmp.put_u16_le(self.chan12_raw);
26646        __tmp.put_u16_le(self.chan13_raw);
26647        __tmp.put_u16_le(self.chan14_raw);
26648        __tmp.put_u16_le(self.chan15_raw);
26649        __tmp.put_u16_le(self.chan16_raw);
26650        __tmp.put_u16_le(self.chan17_raw);
26651        __tmp.put_u16_le(self.chan18_raw);
26652        __tmp.put_u8(self.chancount);
26653        __tmp.put_u8(self.rssi);
26654        if matches!(version, MavlinkVersion::V2) {
26655            let len = __tmp.len();
26656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26657        } else {
26658            __tmp.len()
26659        }
26660    }
26661}
26662#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26663#[doc = ""]
26664#[doc = "ID: 70"]
26665#[derive(Debug, Clone, PartialEq)]
26666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26668#[cfg_attr(feature = "ts", derive(TS))]
26669#[cfg_attr(feature = "ts", ts(export))]
26670pub struct RC_CHANNELS_OVERRIDE_DATA {
26671    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26672    pub chan1_raw: u16,
26673    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26674    pub chan2_raw: u16,
26675    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26676    pub chan3_raw: u16,
26677    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26678    pub chan4_raw: u16,
26679    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26680    pub chan5_raw: u16,
26681    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26682    pub chan6_raw: u16,
26683    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26684    pub chan7_raw: u16,
26685    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26686    pub chan8_raw: u16,
26687    #[doc = "System ID"]
26688    pub target_system: u8,
26689    #[doc = "Component ID"]
26690    pub target_component: u8,
26691    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26693    pub chan9_raw: u16,
26694    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26696    pub chan10_raw: u16,
26697    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26699    pub chan11_raw: u16,
26700    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26702    pub chan12_raw: u16,
26703    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26705    pub chan13_raw: u16,
26706    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26707    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26708    pub chan14_raw: u16,
26709    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26711    pub chan15_raw: u16,
26712    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26714    pub chan16_raw: u16,
26715    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26716    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26717    pub chan17_raw: u16,
26718    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26720    pub chan18_raw: u16,
26721}
26722impl RC_CHANNELS_OVERRIDE_DATA {
26723    pub const ENCODED_LEN: usize = 38usize;
26724    pub const DEFAULT: Self = Self {
26725        chan1_raw: 0_u16,
26726        chan2_raw: 0_u16,
26727        chan3_raw: 0_u16,
26728        chan4_raw: 0_u16,
26729        chan5_raw: 0_u16,
26730        chan6_raw: 0_u16,
26731        chan7_raw: 0_u16,
26732        chan8_raw: 0_u16,
26733        target_system: 0_u8,
26734        target_component: 0_u8,
26735        chan9_raw: 0_u16,
26736        chan10_raw: 0_u16,
26737        chan11_raw: 0_u16,
26738        chan12_raw: 0_u16,
26739        chan13_raw: 0_u16,
26740        chan14_raw: 0_u16,
26741        chan15_raw: 0_u16,
26742        chan16_raw: 0_u16,
26743        chan17_raw: 0_u16,
26744        chan18_raw: 0_u16,
26745    };
26746    #[cfg(feature = "arbitrary")]
26747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26748        use arbitrary::{Arbitrary, Unstructured};
26749        let mut buf = [0u8; 1024];
26750        rng.fill_bytes(&mut buf);
26751        let mut unstructured = Unstructured::new(&buf);
26752        Self::arbitrary(&mut unstructured).unwrap_or_default()
26753    }
26754}
26755impl Default for RC_CHANNELS_OVERRIDE_DATA {
26756    fn default() -> Self {
26757        Self::DEFAULT.clone()
26758    }
26759}
26760impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26761    type Message = MavMessage;
26762    const ID: u32 = 70u32;
26763    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26764    const EXTRA_CRC: u8 = 124u8;
26765    const ENCODED_LEN: usize = 38usize;
26766    fn deser(
26767        _version: MavlinkVersion,
26768        __input: &[u8],
26769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26770        let avail_len = __input.len();
26771        let mut payload_buf = [0; Self::ENCODED_LEN];
26772        let mut buf = if avail_len < Self::ENCODED_LEN {
26773            payload_buf[0..avail_len].copy_from_slice(__input);
26774            Bytes::new(&payload_buf)
26775        } else {
26776            Bytes::new(__input)
26777        };
26778        let mut __struct = Self::default();
26779        __struct.chan1_raw = buf.get_u16_le();
26780        __struct.chan2_raw = buf.get_u16_le();
26781        __struct.chan3_raw = buf.get_u16_le();
26782        __struct.chan4_raw = buf.get_u16_le();
26783        __struct.chan5_raw = buf.get_u16_le();
26784        __struct.chan6_raw = buf.get_u16_le();
26785        __struct.chan7_raw = buf.get_u16_le();
26786        __struct.chan8_raw = buf.get_u16_le();
26787        __struct.target_system = buf.get_u8();
26788        __struct.target_component = buf.get_u8();
26789        __struct.chan9_raw = buf.get_u16_le();
26790        __struct.chan10_raw = buf.get_u16_le();
26791        __struct.chan11_raw = buf.get_u16_le();
26792        __struct.chan12_raw = buf.get_u16_le();
26793        __struct.chan13_raw = buf.get_u16_le();
26794        __struct.chan14_raw = buf.get_u16_le();
26795        __struct.chan15_raw = buf.get_u16_le();
26796        __struct.chan16_raw = buf.get_u16_le();
26797        __struct.chan17_raw = buf.get_u16_le();
26798        __struct.chan18_raw = buf.get_u16_le();
26799        Ok(__struct)
26800    }
26801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26802        let mut __tmp = BytesMut::new(bytes);
26803        #[allow(clippy::absurd_extreme_comparisons)]
26804        #[allow(unused_comparisons)]
26805        if __tmp.remaining() < Self::ENCODED_LEN {
26806            panic!(
26807                "buffer is too small (need {} bytes, but got {})",
26808                Self::ENCODED_LEN,
26809                __tmp.remaining(),
26810            )
26811        }
26812        __tmp.put_u16_le(self.chan1_raw);
26813        __tmp.put_u16_le(self.chan2_raw);
26814        __tmp.put_u16_le(self.chan3_raw);
26815        __tmp.put_u16_le(self.chan4_raw);
26816        __tmp.put_u16_le(self.chan5_raw);
26817        __tmp.put_u16_le(self.chan6_raw);
26818        __tmp.put_u16_le(self.chan7_raw);
26819        __tmp.put_u16_le(self.chan8_raw);
26820        __tmp.put_u8(self.target_system);
26821        __tmp.put_u8(self.target_component);
26822        if matches!(version, MavlinkVersion::V2) {
26823            __tmp.put_u16_le(self.chan9_raw);
26824            __tmp.put_u16_le(self.chan10_raw);
26825            __tmp.put_u16_le(self.chan11_raw);
26826            __tmp.put_u16_le(self.chan12_raw);
26827            __tmp.put_u16_le(self.chan13_raw);
26828            __tmp.put_u16_le(self.chan14_raw);
26829            __tmp.put_u16_le(self.chan15_raw);
26830            __tmp.put_u16_le(self.chan16_raw);
26831            __tmp.put_u16_le(self.chan17_raw);
26832            __tmp.put_u16_le(self.chan18_raw);
26833            let len = __tmp.len();
26834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26835        } else {
26836            __tmp.len()
26837        }
26838    }
26839}
26840#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26841#[doc = ""]
26842#[doc = "ID: 35"]
26843#[derive(Debug, Clone, PartialEq)]
26844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26846#[cfg_attr(feature = "ts", derive(TS))]
26847#[cfg_attr(feature = "ts", ts(export))]
26848pub struct RC_CHANNELS_RAW_DATA {
26849    #[doc = "Timestamp (time since system boot)."]
26850    pub time_boot_ms: u32,
26851    #[doc = "RC channel 1 value."]
26852    pub chan1_raw: u16,
26853    #[doc = "RC channel 2 value."]
26854    pub chan2_raw: u16,
26855    #[doc = "RC channel 3 value."]
26856    pub chan3_raw: u16,
26857    #[doc = "RC channel 4 value."]
26858    pub chan4_raw: u16,
26859    #[doc = "RC channel 5 value."]
26860    pub chan5_raw: u16,
26861    #[doc = "RC channel 6 value."]
26862    pub chan6_raw: u16,
26863    #[doc = "RC channel 7 value."]
26864    pub chan7_raw: u16,
26865    #[doc = "RC channel 8 value."]
26866    pub chan8_raw: u16,
26867    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26868    pub port: u8,
26869    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26870    pub rssi: u8,
26871}
26872impl RC_CHANNELS_RAW_DATA {
26873    pub const ENCODED_LEN: usize = 22usize;
26874    pub const DEFAULT: Self = Self {
26875        time_boot_ms: 0_u32,
26876        chan1_raw: 0_u16,
26877        chan2_raw: 0_u16,
26878        chan3_raw: 0_u16,
26879        chan4_raw: 0_u16,
26880        chan5_raw: 0_u16,
26881        chan6_raw: 0_u16,
26882        chan7_raw: 0_u16,
26883        chan8_raw: 0_u16,
26884        port: 0_u8,
26885        rssi: 0_u8,
26886    };
26887    #[cfg(feature = "arbitrary")]
26888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26889        use arbitrary::{Arbitrary, Unstructured};
26890        let mut buf = [0u8; 1024];
26891        rng.fill_bytes(&mut buf);
26892        let mut unstructured = Unstructured::new(&buf);
26893        Self::arbitrary(&mut unstructured).unwrap_or_default()
26894    }
26895}
26896impl Default for RC_CHANNELS_RAW_DATA {
26897    fn default() -> Self {
26898        Self::DEFAULT.clone()
26899    }
26900}
26901impl MessageData for RC_CHANNELS_RAW_DATA {
26902    type Message = MavMessage;
26903    const ID: u32 = 35u32;
26904    const NAME: &'static str = "RC_CHANNELS_RAW";
26905    const EXTRA_CRC: u8 = 244u8;
26906    const ENCODED_LEN: usize = 22usize;
26907    fn deser(
26908        _version: MavlinkVersion,
26909        __input: &[u8],
26910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26911        let avail_len = __input.len();
26912        let mut payload_buf = [0; Self::ENCODED_LEN];
26913        let mut buf = if avail_len < Self::ENCODED_LEN {
26914            payload_buf[0..avail_len].copy_from_slice(__input);
26915            Bytes::new(&payload_buf)
26916        } else {
26917            Bytes::new(__input)
26918        };
26919        let mut __struct = Self::default();
26920        __struct.time_boot_ms = buf.get_u32_le();
26921        __struct.chan1_raw = buf.get_u16_le();
26922        __struct.chan2_raw = buf.get_u16_le();
26923        __struct.chan3_raw = buf.get_u16_le();
26924        __struct.chan4_raw = buf.get_u16_le();
26925        __struct.chan5_raw = buf.get_u16_le();
26926        __struct.chan6_raw = buf.get_u16_le();
26927        __struct.chan7_raw = buf.get_u16_le();
26928        __struct.chan8_raw = buf.get_u16_le();
26929        __struct.port = buf.get_u8();
26930        __struct.rssi = buf.get_u8();
26931        Ok(__struct)
26932    }
26933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26934        let mut __tmp = BytesMut::new(bytes);
26935        #[allow(clippy::absurd_extreme_comparisons)]
26936        #[allow(unused_comparisons)]
26937        if __tmp.remaining() < Self::ENCODED_LEN {
26938            panic!(
26939                "buffer is too small (need {} bytes, but got {})",
26940                Self::ENCODED_LEN,
26941                __tmp.remaining(),
26942            )
26943        }
26944        __tmp.put_u32_le(self.time_boot_ms);
26945        __tmp.put_u16_le(self.chan1_raw);
26946        __tmp.put_u16_le(self.chan2_raw);
26947        __tmp.put_u16_le(self.chan3_raw);
26948        __tmp.put_u16_le(self.chan4_raw);
26949        __tmp.put_u16_le(self.chan5_raw);
26950        __tmp.put_u16_le(self.chan6_raw);
26951        __tmp.put_u16_le(self.chan7_raw);
26952        __tmp.put_u16_le(self.chan8_raw);
26953        __tmp.put_u8(self.port);
26954        __tmp.put_u8(self.rssi);
26955        if matches!(version, MavlinkVersion::V2) {
26956            let len = __tmp.len();
26957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26958        } else {
26959            __tmp.len()
26960        }
26961    }
26962}
26963#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26964#[doc = ""]
26965#[doc = "ID: 34"]
26966#[derive(Debug, Clone, PartialEq)]
26967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26969#[cfg_attr(feature = "ts", derive(TS))]
26970#[cfg_attr(feature = "ts", ts(export))]
26971pub struct RC_CHANNELS_SCALED_DATA {
26972    #[doc = "Timestamp (time since system boot)."]
26973    pub time_boot_ms: u32,
26974    #[doc = "RC channel 1 value scaled."]
26975    pub chan1_scaled: i16,
26976    #[doc = "RC channel 2 value scaled."]
26977    pub chan2_scaled: i16,
26978    #[doc = "RC channel 3 value scaled."]
26979    pub chan3_scaled: i16,
26980    #[doc = "RC channel 4 value scaled."]
26981    pub chan4_scaled: i16,
26982    #[doc = "RC channel 5 value scaled."]
26983    pub chan5_scaled: i16,
26984    #[doc = "RC channel 6 value scaled."]
26985    pub chan6_scaled: i16,
26986    #[doc = "RC channel 7 value scaled."]
26987    pub chan7_scaled: i16,
26988    #[doc = "RC channel 8 value scaled."]
26989    pub chan8_scaled: i16,
26990    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26991    pub port: u8,
26992    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26993    pub rssi: u8,
26994}
26995impl RC_CHANNELS_SCALED_DATA {
26996    pub const ENCODED_LEN: usize = 22usize;
26997    pub const DEFAULT: Self = Self {
26998        time_boot_ms: 0_u32,
26999        chan1_scaled: 0_i16,
27000        chan2_scaled: 0_i16,
27001        chan3_scaled: 0_i16,
27002        chan4_scaled: 0_i16,
27003        chan5_scaled: 0_i16,
27004        chan6_scaled: 0_i16,
27005        chan7_scaled: 0_i16,
27006        chan8_scaled: 0_i16,
27007        port: 0_u8,
27008        rssi: 0_u8,
27009    };
27010    #[cfg(feature = "arbitrary")]
27011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27012        use arbitrary::{Arbitrary, Unstructured};
27013        let mut buf = [0u8; 1024];
27014        rng.fill_bytes(&mut buf);
27015        let mut unstructured = Unstructured::new(&buf);
27016        Self::arbitrary(&mut unstructured).unwrap_or_default()
27017    }
27018}
27019impl Default for RC_CHANNELS_SCALED_DATA {
27020    fn default() -> Self {
27021        Self::DEFAULT.clone()
27022    }
27023}
27024impl MessageData for RC_CHANNELS_SCALED_DATA {
27025    type Message = MavMessage;
27026    const ID: u32 = 34u32;
27027    const NAME: &'static str = "RC_CHANNELS_SCALED";
27028    const EXTRA_CRC: u8 = 237u8;
27029    const ENCODED_LEN: usize = 22usize;
27030    fn deser(
27031        _version: MavlinkVersion,
27032        __input: &[u8],
27033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27034        let avail_len = __input.len();
27035        let mut payload_buf = [0; Self::ENCODED_LEN];
27036        let mut buf = if avail_len < Self::ENCODED_LEN {
27037            payload_buf[0..avail_len].copy_from_slice(__input);
27038            Bytes::new(&payload_buf)
27039        } else {
27040            Bytes::new(__input)
27041        };
27042        let mut __struct = Self::default();
27043        __struct.time_boot_ms = buf.get_u32_le();
27044        __struct.chan1_scaled = buf.get_i16_le();
27045        __struct.chan2_scaled = buf.get_i16_le();
27046        __struct.chan3_scaled = buf.get_i16_le();
27047        __struct.chan4_scaled = buf.get_i16_le();
27048        __struct.chan5_scaled = buf.get_i16_le();
27049        __struct.chan6_scaled = buf.get_i16_le();
27050        __struct.chan7_scaled = buf.get_i16_le();
27051        __struct.chan8_scaled = buf.get_i16_le();
27052        __struct.port = buf.get_u8();
27053        __struct.rssi = buf.get_u8();
27054        Ok(__struct)
27055    }
27056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27057        let mut __tmp = BytesMut::new(bytes);
27058        #[allow(clippy::absurd_extreme_comparisons)]
27059        #[allow(unused_comparisons)]
27060        if __tmp.remaining() < Self::ENCODED_LEN {
27061            panic!(
27062                "buffer is too small (need {} bytes, but got {})",
27063                Self::ENCODED_LEN,
27064                __tmp.remaining(),
27065            )
27066        }
27067        __tmp.put_u32_le(self.time_boot_ms);
27068        __tmp.put_i16_le(self.chan1_scaled);
27069        __tmp.put_i16_le(self.chan2_scaled);
27070        __tmp.put_i16_le(self.chan3_scaled);
27071        __tmp.put_i16_le(self.chan4_scaled);
27072        __tmp.put_i16_le(self.chan5_scaled);
27073        __tmp.put_i16_le(self.chan6_scaled);
27074        __tmp.put_i16_le(self.chan7_scaled);
27075        __tmp.put_i16_le(self.chan8_scaled);
27076        __tmp.put_u8(self.port);
27077        __tmp.put_u8(self.rssi);
27078        if matches!(version, MavlinkVersion::V2) {
27079            let len = __tmp.len();
27080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27081        } else {
27082            __tmp.len()
27083        }
27084    }
27085}
27086#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
27087#[doc = "Request a data stream."]
27088#[doc = ""]
27089#[doc = "ID: 66"]
27090#[derive(Debug, Clone, PartialEq)]
27091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27093#[cfg_attr(feature = "ts", derive(TS))]
27094#[cfg_attr(feature = "ts", ts(export))]
27095pub struct REQUEST_DATA_STREAM_DATA {
27096    #[doc = "The requested message rate"]
27097    pub req_message_rate: u16,
27098    #[doc = "The target requested to send the message stream."]
27099    pub target_system: u8,
27100    #[doc = "The target requested to send the message stream."]
27101    pub target_component: u8,
27102    #[doc = "The ID of the requested data stream"]
27103    pub req_stream_id: u8,
27104    #[doc = "1 to start sending, 0 to stop sending."]
27105    pub start_stop: u8,
27106}
27107impl REQUEST_DATA_STREAM_DATA {
27108    pub const ENCODED_LEN: usize = 6usize;
27109    pub const DEFAULT: Self = Self {
27110        req_message_rate: 0_u16,
27111        target_system: 0_u8,
27112        target_component: 0_u8,
27113        req_stream_id: 0_u8,
27114        start_stop: 0_u8,
27115    };
27116    #[cfg(feature = "arbitrary")]
27117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27118        use arbitrary::{Arbitrary, Unstructured};
27119        let mut buf = [0u8; 1024];
27120        rng.fill_bytes(&mut buf);
27121        let mut unstructured = Unstructured::new(&buf);
27122        Self::arbitrary(&mut unstructured).unwrap_or_default()
27123    }
27124}
27125impl Default for REQUEST_DATA_STREAM_DATA {
27126    fn default() -> Self {
27127        Self::DEFAULT.clone()
27128    }
27129}
27130impl MessageData for REQUEST_DATA_STREAM_DATA {
27131    type Message = MavMessage;
27132    const ID: u32 = 66u32;
27133    const NAME: &'static str = "REQUEST_DATA_STREAM";
27134    const EXTRA_CRC: u8 = 148u8;
27135    const ENCODED_LEN: usize = 6usize;
27136    fn deser(
27137        _version: MavlinkVersion,
27138        __input: &[u8],
27139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27140        let avail_len = __input.len();
27141        let mut payload_buf = [0; Self::ENCODED_LEN];
27142        let mut buf = if avail_len < Self::ENCODED_LEN {
27143            payload_buf[0..avail_len].copy_from_slice(__input);
27144            Bytes::new(&payload_buf)
27145        } else {
27146            Bytes::new(__input)
27147        };
27148        let mut __struct = Self::default();
27149        __struct.req_message_rate = buf.get_u16_le();
27150        __struct.target_system = buf.get_u8();
27151        __struct.target_component = buf.get_u8();
27152        __struct.req_stream_id = buf.get_u8();
27153        __struct.start_stop = buf.get_u8();
27154        Ok(__struct)
27155    }
27156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27157        let mut __tmp = BytesMut::new(bytes);
27158        #[allow(clippy::absurd_extreme_comparisons)]
27159        #[allow(unused_comparisons)]
27160        if __tmp.remaining() < Self::ENCODED_LEN {
27161            panic!(
27162                "buffer is too small (need {} bytes, but got {})",
27163                Self::ENCODED_LEN,
27164                __tmp.remaining(),
27165            )
27166        }
27167        __tmp.put_u16_le(self.req_message_rate);
27168        __tmp.put_u8(self.target_system);
27169        __tmp.put_u8(self.target_component);
27170        __tmp.put_u8(self.req_stream_id);
27171        __tmp.put_u8(self.start_stop);
27172        if matches!(version, MavlinkVersion::V2) {
27173            let len = __tmp.len();
27174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27175        } else {
27176            __tmp.len()
27177        }
27178    }
27179}
27180#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
27181#[doc = ""]
27182#[doc = "ID: 412"]
27183#[derive(Debug, Clone, PartialEq)]
27184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27186#[cfg_attr(feature = "ts", derive(TS))]
27187#[cfg_attr(feature = "ts", ts(export))]
27188pub struct REQUEST_EVENT_DATA {
27189    #[doc = "First sequence number of the requested event."]
27190    pub first_sequence: u16,
27191    #[doc = "Last sequence number of the requested event."]
27192    pub last_sequence: u16,
27193    #[doc = "System ID"]
27194    pub target_system: u8,
27195    #[doc = "Component ID"]
27196    pub target_component: u8,
27197}
27198impl REQUEST_EVENT_DATA {
27199    pub const ENCODED_LEN: usize = 6usize;
27200    pub const DEFAULT: Self = Self {
27201        first_sequence: 0_u16,
27202        last_sequence: 0_u16,
27203        target_system: 0_u8,
27204        target_component: 0_u8,
27205    };
27206    #[cfg(feature = "arbitrary")]
27207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27208        use arbitrary::{Arbitrary, Unstructured};
27209        let mut buf = [0u8; 1024];
27210        rng.fill_bytes(&mut buf);
27211        let mut unstructured = Unstructured::new(&buf);
27212        Self::arbitrary(&mut unstructured).unwrap_or_default()
27213    }
27214}
27215impl Default for REQUEST_EVENT_DATA {
27216    fn default() -> Self {
27217        Self::DEFAULT.clone()
27218    }
27219}
27220impl MessageData for REQUEST_EVENT_DATA {
27221    type Message = MavMessage;
27222    const ID: u32 = 412u32;
27223    const NAME: &'static str = "REQUEST_EVENT";
27224    const EXTRA_CRC: u8 = 33u8;
27225    const ENCODED_LEN: usize = 6usize;
27226    fn deser(
27227        _version: MavlinkVersion,
27228        __input: &[u8],
27229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27230        let avail_len = __input.len();
27231        let mut payload_buf = [0; Self::ENCODED_LEN];
27232        let mut buf = if avail_len < Self::ENCODED_LEN {
27233            payload_buf[0..avail_len].copy_from_slice(__input);
27234            Bytes::new(&payload_buf)
27235        } else {
27236            Bytes::new(__input)
27237        };
27238        let mut __struct = Self::default();
27239        __struct.first_sequence = buf.get_u16_le();
27240        __struct.last_sequence = buf.get_u16_le();
27241        __struct.target_system = buf.get_u8();
27242        __struct.target_component = buf.get_u8();
27243        Ok(__struct)
27244    }
27245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27246        let mut __tmp = BytesMut::new(bytes);
27247        #[allow(clippy::absurd_extreme_comparisons)]
27248        #[allow(unused_comparisons)]
27249        if __tmp.remaining() < Self::ENCODED_LEN {
27250            panic!(
27251                "buffer is too small (need {} bytes, but got {})",
27252                Self::ENCODED_LEN,
27253                __tmp.remaining(),
27254            )
27255        }
27256        __tmp.put_u16_le(self.first_sequence);
27257        __tmp.put_u16_le(self.last_sequence);
27258        __tmp.put_u8(self.target_system);
27259        __tmp.put_u8(self.target_component);
27260        if matches!(version, MavlinkVersion::V2) {
27261            let len = __tmp.len();
27262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27263        } else {
27264            __tmp.len()
27265        }
27266    }
27267}
27268#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
27269#[doc = ""]
27270#[doc = "ID: 142"]
27271#[derive(Debug, Clone, PartialEq)]
27272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27274#[cfg_attr(feature = "ts", derive(TS))]
27275#[cfg_attr(feature = "ts", ts(export))]
27276pub struct RESOURCE_REQUEST_DATA {
27277    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27278    pub request_id: u8,
27279    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27280    pub uri_type: u8,
27281    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27284    pub uri: [u8; 120],
27285    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27286    pub transfer_type: u8,
27287    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27288    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27289    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27290    pub storage: [u8; 120],
27291}
27292impl RESOURCE_REQUEST_DATA {
27293    pub const ENCODED_LEN: usize = 243usize;
27294    pub const DEFAULT: Self = Self {
27295        request_id: 0_u8,
27296        uri_type: 0_u8,
27297        uri: [0_u8; 120usize],
27298        transfer_type: 0_u8,
27299        storage: [0_u8; 120usize],
27300    };
27301    #[cfg(feature = "arbitrary")]
27302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27303        use arbitrary::{Arbitrary, Unstructured};
27304        let mut buf = [0u8; 1024];
27305        rng.fill_bytes(&mut buf);
27306        let mut unstructured = Unstructured::new(&buf);
27307        Self::arbitrary(&mut unstructured).unwrap_or_default()
27308    }
27309}
27310impl Default for RESOURCE_REQUEST_DATA {
27311    fn default() -> Self {
27312        Self::DEFAULT.clone()
27313    }
27314}
27315impl MessageData for RESOURCE_REQUEST_DATA {
27316    type Message = MavMessage;
27317    const ID: u32 = 142u32;
27318    const NAME: &'static str = "RESOURCE_REQUEST";
27319    const EXTRA_CRC: u8 = 72u8;
27320    const ENCODED_LEN: usize = 243usize;
27321    fn deser(
27322        _version: MavlinkVersion,
27323        __input: &[u8],
27324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27325        let avail_len = __input.len();
27326        let mut payload_buf = [0; Self::ENCODED_LEN];
27327        let mut buf = if avail_len < Self::ENCODED_LEN {
27328            payload_buf[0..avail_len].copy_from_slice(__input);
27329            Bytes::new(&payload_buf)
27330        } else {
27331            Bytes::new(__input)
27332        };
27333        let mut __struct = Self::default();
27334        __struct.request_id = buf.get_u8();
27335        __struct.uri_type = buf.get_u8();
27336        for v in &mut __struct.uri {
27337            let val = buf.get_u8();
27338            *v = val;
27339        }
27340        __struct.transfer_type = buf.get_u8();
27341        for v in &mut __struct.storage {
27342            let val = buf.get_u8();
27343            *v = val;
27344        }
27345        Ok(__struct)
27346    }
27347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27348        let mut __tmp = BytesMut::new(bytes);
27349        #[allow(clippy::absurd_extreme_comparisons)]
27350        #[allow(unused_comparisons)]
27351        if __tmp.remaining() < Self::ENCODED_LEN {
27352            panic!(
27353                "buffer is too small (need {} bytes, but got {})",
27354                Self::ENCODED_LEN,
27355                __tmp.remaining(),
27356            )
27357        }
27358        __tmp.put_u8(self.request_id);
27359        __tmp.put_u8(self.uri_type);
27360        for val in &self.uri {
27361            __tmp.put_u8(*val);
27362        }
27363        __tmp.put_u8(self.transfer_type);
27364        for val in &self.storage {
27365            __tmp.put_u8(*val);
27366        }
27367        if matches!(version, MavlinkVersion::V2) {
27368            let len = __tmp.len();
27369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27370        } else {
27371            __tmp.len()
27372        }
27373    }
27374}
27375#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27376#[doc = ""]
27377#[doc = "ID: 413"]
27378#[derive(Debug, Clone, PartialEq)]
27379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27381#[cfg_attr(feature = "ts", derive(TS))]
27382#[cfg_attr(feature = "ts", ts(export))]
27383pub struct RESPONSE_EVENT_ERROR_DATA {
27384    #[doc = "Sequence number."]
27385    pub sequence: u16,
27386    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27387    pub sequence_oldest_available: u16,
27388    #[doc = "System ID"]
27389    pub target_system: u8,
27390    #[doc = "Component ID"]
27391    pub target_component: u8,
27392    #[doc = "Error reason."]
27393    pub reason: MavEventErrorReason,
27394}
27395impl RESPONSE_EVENT_ERROR_DATA {
27396    pub const ENCODED_LEN: usize = 7usize;
27397    pub const DEFAULT: Self = Self {
27398        sequence: 0_u16,
27399        sequence_oldest_available: 0_u16,
27400        target_system: 0_u8,
27401        target_component: 0_u8,
27402        reason: MavEventErrorReason::DEFAULT,
27403    };
27404    #[cfg(feature = "arbitrary")]
27405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27406        use arbitrary::{Arbitrary, Unstructured};
27407        let mut buf = [0u8; 1024];
27408        rng.fill_bytes(&mut buf);
27409        let mut unstructured = Unstructured::new(&buf);
27410        Self::arbitrary(&mut unstructured).unwrap_or_default()
27411    }
27412}
27413impl Default for RESPONSE_EVENT_ERROR_DATA {
27414    fn default() -> Self {
27415        Self::DEFAULT.clone()
27416    }
27417}
27418impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27419    type Message = MavMessage;
27420    const ID: u32 = 413u32;
27421    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27422    const EXTRA_CRC: u8 = 77u8;
27423    const ENCODED_LEN: usize = 7usize;
27424    fn deser(
27425        _version: MavlinkVersion,
27426        __input: &[u8],
27427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27428        let avail_len = __input.len();
27429        let mut payload_buf = [0; Self::ENCODED_LEN];
27430        let mut buf = if avail_len < Self::ENCODED_LEN {
27431            payload_buf[0..avail_len].copy_from_slice(__input);
27432            Bytes::new(&payload_buf)
27433        } else {
27434            Bytes::new(__input)
27435        };
27436        let mut __struct = Self::default();
27437        __struct.sequence = buf.get_u16_le();
27438        __struct.sequence_oldest_available = buf.get_u16_le();
27439        __struct.target_system = buf.get_u8();
27440        __struct.target_component = buf.get_u8();
27441        let tmp = buf.get_u8();
27442        __struct.reason =
27443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27444                enum_type: "MavEventErrorReason",
27445                value: tmp as u32,
27446            })?;
27447        Ok(__struct)
27448    }
27449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27450        let mut __tmp = BytesMut::new(bytes);
27451        #[allow(clippy::absurd_extreme_comparisons)]
27452        #[allow(unused_comparisons)]
27453        if __tmp.remaining() < Self::ENCODED_LEN {
27454            panic!(
27455                "buffer is too small (need {} bytes, but got {})",
27456                Self::ENCODED_LEN,
27457                __tmp.remaining(),
27458            )
27459        }
27460        __tmp.put_u16_le(self.sequence);
27461        __tmp.put_u16_le(self.sequence_oldest_available);
27462        __tmp.put_u8(self.target_system);
27463        __tmp.put_u8(self.target_component);
27464        __tmp.put_u8(self.reason as u8);
27465        if matches!(version, MavlinkVersion::V2) {
27466            let len = __tmp.len();
27467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27468        } else {
27469            __tmp.len()
27470        }
27471    }
27472}
27473#[doc = "Read out the safety zone the MAV currently assumes."]
27474#[doc = ""]
27475#[doc = "ID: 55"]
27476#[derive(Debug, Clone, PartialEq)]
27477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27479#[cfg_attr(feature = "ts", derive(TS))]
27480#[cfg_attr(feature = "ts", ts(export))]
27481pub struct SAFETY_ALLOWED_AREA_DATA {
27482    #[doc = "x position 1 / Latitude 1"]
27483    pub p1x: f32,
27484    #[doc = "y position 1 / Longitude 1"]
27485    pub p1y: f32,
27486    #[doc = "z position 1 / Altitude 1"]
27487    pub p1z: f32,
27488    #[doc = "x position 2 / Latitude 2"]
27489    pub p2x: f32,
27490    #[doc = "y position 2 / Longitude 2"]
27491    pub p2y: f32,
27492    #[doc = "z position 2 / Altitude 2"]
27493    pub p2z: f32,
27494    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27495    pub frame: MavFrame,
27496}
27497impl SAFETY_ALLOWED_AREA_DATA {
27498    pub const ENCODED_LEN: usize = 25usize;
27499    pub const DEFAULT: Self = Self {
27500        p1x: 0.0_f32,
27501        p1y: 0.0_f32,
27502        p1z: 0.0_f32,
27503        p2x: 0.0_f32,
27504        p2y: 0.0_f32,
27505        p2z: 0.0_f32,
27506        frame: MavFrame::DEFAULT,
27507    };
27508    #[cfg(feature = "arbitrary")]
27509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27510        use arbitrary::{Arbitrary, Unstructured};
27511        let mut buf = [0u8; 1024];
27512        rng.fill_bytes(&mut buf);
27513        let mut unstructured = Unstructured::new(&buf);
27514        Self::arbitrary(&mut unstructured).unwrap_or_default()
27515    }
27516}
27517impl Default for SAFETY_ALLOWED_AREA_DATA {
27518    fn default() -> Self {
27519        Self::DEFAULT.clone()
27520    }
27521}
27522impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27523    type Message = MavMessage;
27524    const ID: u32 = 55u32;
27525    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27526    const EXTRA_CRC: u8 = 3u8;
27527    const ENCODED_LEN: usize = 25usize;
27528    fn deser(
27529        _version: MavlinkVersion,
27530        __input: &[u8],
27531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27532        let avail_len = __input.len();
27533        let mut payload_buf = [0; Self::ENCODED_LEN];
27534        let mut buf = if avail_len < Self::ENCODED_LEN {
27535            payload_buf[0..avail_len].copy_from_slice(__input);
27536            Bytes::new(&payload_buf)
27537        } else {
27538            Bytes::new(__input)
27539        };
27540        let mut __struct = Self::default();
27541        __struct.p1x = buf.get_f32_le();
27542        __struct.p1y = buf.get_f32_le();
27543        __struct.p1z = buf.get_f32_le();
27544        __struct.p2x = buf.get_f32_le();
27545        __struct.p2y = buf.get_f32_le();
27546        __struct.p2z = buf.get_f32_le();
27547        let tmp = buf.get_u8();
27548        __struct.frame =
27549            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27550                enum_type: "MavFrame",
27551                value: tmp as u32,
27552            })?;
27553        Ok(__struct)
27554    }
27555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27556        let mut __tmp = BytesMut::new(bytes);
27557        #[allow(clippy::absurd_extreme_comparisons)]
27558        #[allow(unused_comparisons)]
27559        if __tmp.remaining() < Self::ENCODED_LEN {
27560            panic!(
27561                "buffer is too small (need {} bytes, but got {})",
27562                Self::ENCODED_LEN,
27563                __tmp.remaining(),
27564            )
27565        }
27566        __tmp.put_f32_le(self.p1x);
27567        __tmp.put_f32_le(self.p1y);
27568        __tmp.put_f32_le(self.p1z);
27569        __tmp.put_f32_le(self.p2x);
27570        __tmp.put_f32_le(self.p2y);
27571        __tmp.put_f32_le(self.p2z);
27572        __tmp.put_u8(self.frame as u8);
27573        if matches!(version, MavlinkVersion::V2) {
27574            let len = __tmp.len();
27575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27576        } else {
27577            __tmp.len()
27578        }
27579    }
27580}
27581#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27582#[doc = ""]
27583#[doc = "ID: 54"]
27584#[derive(Debug, Clone, PartialEq)]
27585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27587#[cfg_attr(feature = "ts", derive(TS))]
27588#[cfg_attr(feature = "ts", ts(export))]
27589pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27590    #[doc = "x position 1 / Latitude 1"]
27591    pub p1x: f32,
27592    #[doc = "y position 1 / Longitude 1"]
27593    pub p1y: f32,
27594    #[doc = "z position 1 / Altitude 1"]
27595    pub p1z: f32,
27596    #[doc = "x position 2 / Latitude 2"]
27597    pub p2x: f32,
27598    #[doc = "y position 2 / Longitude 2"]
27599    pub p2y: f32,
27600    #[doc = "z position 2 / Altitude 2"]
27601    pub p2z: f32,
27602    #[doc = "System ID"]
27603    pub target_system: u8,
27604    #[doc = "Component ID"]
27605    pub target_component: u8,
27606    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27607    pub frame: MavFrame,
27608}
27609impl SAFETY_SET_ALLOWED_AREA_DATA {
27610    pub const ENCODED_LEN: usize = 27usize;
27611    pub const DEFAULT: Self = Self {
27612        p1x: 0.0_f32,
27613        p1y: 0.0_f32,
27614        p1z: 0.0_f32,
27615        p2x: 0.0_f32,
27616        p2y: 0.0_f32,
27617        p2z: 0.0_f32,
27618        target_system: 0_u8,
27619        target_component: 0_u8,
27620        frame: MavFrame::DEFAULT,
27621    };
27622    #[cfg(feature = "arbitrary")]
27623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27624        use arbitrary::{Arbitrary, Unstructured};
27625        let mut buf = [0u8; 1024];
27626        rng.fill_bytes(&mut buf);
27627        let mut unstructured = Unstructured::new(&buf);
27628        Self::arbitrary(&mut unstructured).unwrap_or_default()
27629    }
27630}
27631impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27632    fn default() -> Self {
27633        Self::DEFAULT.clone()
27634    }
27635}
27636impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27637    type Message = MavMessage;
27638    const ID: u32 = 54u32;
27639    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27640    const EXTRA_CRC: u8 = 15u8;
27641    const ENCODED_LEN: usize = 27usize;
27642    fn deser(
27643        _version: MavlinkVersion,
27644        __input: &[u8],
27645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27646        let avail_len = __input.len();
27647        let mut payload_buf = [0; Self::ENCODED_LEN];
27648        let mut buf = if avail_len < Self::ENCODED_LEN {
27649            payload_buf[0..avail_len].copy_from_slice(__input);
27650            Bytes::new(&payload_buf)
27651        } else {
27652            Bytes::new(__input)
27653        };
27654        let mut __struct = Self::default();
27655        __struct.p1x = buf.get_f32_le();
27656        __struct.p1y = buf.get_f32_le();
27657        __struct.p1z = buf.get_f32_le();
27658        __struct.p2x = buf.get_f32_le();
27659        __struct.p2y = buf.get_f32_le();
27660        __struct.p2z = buf.get_f32_le();
27661        __struct.target_system = buf.get_u8();
27662        __struct.target_component = buf.get_u8();
27663        let tmp = buf.get_u8();
27664        __struct.frame =
27665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27666                enum_type: "MavFrame",
27667                value: tmp as u32,
27668            })?;
27669        Ok(__struct)
27670    }
27671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27672        let mut __tmp = BytesMut::new(bytes);
27673        #[allow(clippy::absurd_extreme_comparisons)]
27674        #[allow(unused_comparisons)]
27675        if __tmp.remaining() < Self::ENCODED_LEN {
27676            panic!(
27677                "buffer is too small (need {} bytes, but got {})",
27678                Self::ENCODED_LEN,
27679                __tmp.remaining(),
27680            )
27681        }
27682        __tmp.put_f32_le(self.p1x);
27683        __tmp.put_f32_le(self.p1y);
27684        __tmp.put_f32_le(self.p1z);
27685        __tmp.put_f32_le(self.p2x);
27686        __tmp.put_f32_le(self.p2y);
27687        __tmp.put_f32_le(self.p2z);
27688        __tmp.put_u8(self.target_system);
27689        __tmp.put_u8(self.target_component);
27690        __tmp.put_u8(self.frame as u8);
27691        if matches!(version, MavlinkVersion::V2) {
27692            let len = __tmp.len();
27693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27694        } else {
27695            __tmp.len()
27696        }
27697    }
27698}
27699#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27700#[doc = ""]
27701#[doc = "ID: 26"]
27702#[derive(Debug, Clone, PartialEq)]
27703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27705#[cfg_attr(feature = "ts", derive(TS))]
27706#[cfg_attr(feature = "ts", ts(export))]
27707pub struct SCALED_IMU_DATA {
27708    #[doc = "Timestamp (time since system boot)."]
27709    pub time_boot_ms: u32,
27710    #[doc = "X acceleration"]
27711    pub xacc: i16,
27712    #[doc = "Y acceleration"]
27713    pub yacc: i16,
27714    #[doc = "Z acceleration"]
27715    pub zacc: i16,
27716    #[doc = "Angular speed around X axis"]
27717    pub xgyro: i16,
27718    #[doc = "Angular speed around Y axis"]
27719    pub ygyro: i16,
27720    #[doc = "Angular speed around Z axis"]
27721    pub zgyro: i16,
27722    #[doc = "X Magnetic field"]
27723    pub xmag: i16,
27724    #[doc = "Y Magnetic field"]
27725    pub ymag: i16,
27726    #[doc = "Z Magnetic field"]
27727    pub zmag: i16,
27728    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27729    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27730    pub temperature: i16,
27731}
27732impl SCALED_IMU_DATA {
27733    pub const ENCODED_LEN: usize = 24usize;
27734    pub const DEFAULT: Self = Self {
27735        time_boot_ms: 0_u32,
27736        xacc: 0_i16,
27737        yacc: 0_i16,
27738        zacc: 0_i16,
27739        xgyro: 0_i16,
27740        ygyro: 0_i16,
27741        zgyro: 0_i16,
27742        xmag: 0_i16,
27743        ymag: 0_i16,
27744        zmag: 0_i16,
27745        temperature: 0_i16,
27746    };
27747    #[cfg(feature = "arbitrary")]
27748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27749        use arbitrary::{Arbitrary, Unstructured};
27750        let mut buf = [0u8; 1024];
27751        rng.fill_bytes(&mut buf);
27752        let mut unstructured = Unstructured::new(&buf);
27753        Self::arbitrary(&mut unstructured).unwrap_or_default()
27754    }
27755}
27756impl Default for SCALED_IMU_DATA {
27757    fn default() -> Self {
27758        Self::DEFAULT.clone()
27759    }
27760}
27761impl MessageData for SCALED_IMU_DATA {
27762    type Message = MavMessage;
27763    const ID: u32 = 26u32;
27764    const NAME: &'static str = "SCALED_IMU";
27765    const EXTRA_CRC: u8 = 170u8;
27766    const ENCODED_LEN: usize = 24usize;
27767    fn deser(
27768        _version: MavlinkVersion,
27769        __input: &[u8],
27770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27771        let avail_len = __input.len();
27772        let mut payload_buf = [0; Self::ENCODED_LEN];
27773        let mut buf = if avail_len < Self::ENCODED_LEN {
27774            payload_buf[0..avail_len].copy_from_slice(__input);
27775            Bytes::new(&payload_buf)
27776        } else {
27777            Bytes::new(__input)
27778        };
27779        let mut __struct = Self::default();
27780        __struct.time_boot_ms = buf.get_u32_le();
27781        __struct.xacc = buf.get_i16_le();
27782        __struct.yacc = buf.get_i16_le();
27783        __struct.zacc = buf.get_i16_le();
27784        __struct.xgyro = buf.get_i16_le();
27785        __struct.ygyro = buf.get_i16_le();
27786        __struct.zgyro = buf.get_i16_le();
27787        __struct.xmag = buf.get_i16_le();
27788        __struct.ymag = buf.get_i16_le();
27789        __struct.zmag = buf.get_i16_le();
27790        __struct.temperature = buf.get_i16_le();
27791        Ok(__struct)
27792    }
27793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27794        let mut __tmp = BytesMut::new(bytes);
27795        #[allow(clippy::absurd_extreme_comparisons)]
27796        #[allow(unused_comparisons)]
27797        if __tmp.remaining() < Self::ENCODED_LEN {
27798            panic!(
27799                "buffer is too small (need {} bytes, but got {})",
27800                Self::ENCODED_LEN,
27801                __tmp.remaining(),
27802            )
27803        }
27804        __tmp.put_u32_le(self.time_boot_ms);
27805        __tmp.put_i16_le(self.xacc);
27806        __tmp.put_i16_le(self.yacc);
27807        __tmp.put_i16_le(self.zacc);
27808        __tmp.put_i16_le(self.xgyro);
27809        __tmp.put_i16_le(self.ygyro);
27810        __tmp.put_i16_le(self.zgyro);
27811        __tmp.put_i16_le(self.xmag);
27812        __tmp.put_i16_le(self.ymag);
27813        __tmp.put_i16_le(self.zmag);
27814        if matches!(version, MavlinkVersion::V2) {
27815            __tmp.put_i16_le(self.temperature);
27816            let len = __tmp.len();
27817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27818        } else {
27819            __tmp.len()
27820        }
27821    }
27822}
27823#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27824#[doc = ""]
27825#[doc = "ID: 116"]
27826#[derive(Debug, Clone, PartialEq)]
27827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27829#[cfg_attr(feature = "ts", derive(TS))]
27830#[cfg_attr(feature = "ts", ts(export))]
27831pub struct SCALED_IMU2_DATA {
27832    #[doc = "Timestamp (time since system boot)."]
27833    pub time_boot_ms: u32,
27834    #[doc = "X acceleration"]
27835    pub xacc: i16,
27836    #[doc = "Y acceleration"]
27837    pub yacc: i16,
27838    #[doc = "Z acceleration"]
27839    pub zacc: i16,
27840    #[doc = "Angular speed around X axis"]
27841    pub xgyro: i16,
27842    #[doc = "Angular speed around Y axis"]
27843    pub ygyro: i16,
27844    #[doc = "Angular speed around Z axis"]
27845    pub zgyro: i16,
27846    #[doc = "X Magnetic field"]
27847    pub xmag: i16,
27848    #[doc = "Y Magnetic field"]
27849    pub ymag: i16,
27850    #[doc = "Z Magnetic field"]
27851    pub zmag: i16,
27852    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27853    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27854    pub temperature: i16,
27855}
27856impl SCALED_IMU2_DATA {
27857    pub const ENCODED_LEN: usize = 24usize;
27858    pub const DEFAULT: Self = Self {
27859        time_boot_ms: 0_u32,
27860        xacc: 0_i16,
27861        yacc: 0_i16,
27862        zacc: 0_i16,
27863        xgyro: 0_i16,
27864        ygyro: 0_i16,
27865        zgyro: 0_i16,
27866        xmag: 0_i16,
27867        ymag: 0_i16,
27868        zmag: 0_i16,
27869        temperature: 0_i16,
27870    };
27871    #[cfg(feature = "arbitrary")]
27872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27873        use arbitrary::{Arbitrary, Unstructured};
27874        let mut buf = [0u8; 1024];
27875        rng.fill_bytes(&mut buf);
27876        let mut unstructured = Unstructured::new(&buf);
27877        Self::arbitrary(&mut unstructured).unwrap_or_default()
27878    }
27879}
27880impl Default for SCALED_IMU2_DATA {
27881    fn default() -> Self {
27882        Self::DEFAULT.clone()
27883    }
27884}
27885impl MessageData for SCALED_IMU2_DATA {
27886    type Message = MavMessage;
27887    const ID: u32 = 116u32;
27888    const NAME: &'static str = "SCALED_IMU2";
27889    const EXTRA_CRC: u8 = 76u8;
27890    const ENCODED_LEN: usize = 24usize;
27891    fn deser(
27892        _version: MavlinkVersion,
27893        __input: &[u8],
27894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27895        let avail_len = __input.len();
27896        let mut payload_buf = [0; Self::ENCODED_LEN];
27897        let mut buf = if avail_len < Self::ENCODED_LEN {
27898            payload_buf[0..avail_len].copy_from_slice(__input);
27899            Bytes::new(&payload_buf)
27900        } else {
27901            Bytes::new(__input)
27902        };
27903        let mut __struct = Self::default();
27904        __struct.time_boot_ms = buf.get_u32_le();
27905        __struct.xacc = buf.get_i16_le();
27906        __struct.yacc = buf.get_i16_le();
27907        __struct.zacc = buf.get_i16_le();
27908        __struct.xgyro = buf.get_i16_le();
27909        __struct.ygyro = buf.get_i16_le();
27910        __struct.zgyro = buf.get_i16_le();
27911        __struct.xmag = buf.get_i16_le();
27912        __struct.ymag = buf.get_i16_le();
27913        __struct.zmag = buf.get_i16_le();
27914        __struct.temperature = buf.get_i16_le();
27915        Ok(__struct)
27916    }
27917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27918        let mut __tmp = BytesMut::new(bytes);
27919        #[allow(clippy::absurd_extreme_comparisons)]
27920        #[allow(unused_comparisons)]
27921        if __tmp.remaining() < Self::ENCODED_LEN {
27922            panic!(
27923                "buffer is too small (need {} bytes, but got {})",
27924                Self::ENCODED_LEN,
27925                __tmp.remaining(),
27926            )
27927        }
27928        __tmp.put_u32_le(self.time_boot_ms);
27929        __tmp.put_i16_le(self.xacc);
27930        __tmp.put_i16_le(self.yacc);
27931        __tmp.put_i16_le(self.zacc);
27932        __tmp.put_i16_le(self.xgyro);
27933        __tmp.put_i16_le(self.ygyro);
27934        __tmp.put_i16_le(self.zgyro);
27935        __tmp.put_i16_le(self.xmag);
27936        __tmp.put_i16_le(self.ymag);
27937        __tmp.put_i16_le(self.zmag);
27938        if matches!(version, MavlinkVersion::V2) {
27939            __tmp.put_i16_le(self.temperature);
27940            let len = __tmp.len();
27941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27942        } else {
27943            __tmp.len()
27944        }
27945    }
27946}
27947#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27948#[doc = ""]
27949#[doc = "ID: 129"]
27950#[derive(Debug, Clone, PartialEq)]
27951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27953#[cfg_attr(feature = "ts", derive(TS))]
27954#[cfg_attr(feature = "ts", ts(export))]
27955pub struct SCALED_IMU3_DATA {
27956    #[doc = "Timestamp (time since system boot)."]
27957    pub time_boot_ms: u32,
27958    #[doc = "X acceleration"]
27959    pub xacc: i16,
27960    #[doc = "Y acceleration"]
27961    pub yacc: i16,
27962    #[doc = "Z acceleration"]
27963    pub zacc: i16,
27964    #[doc = "Angular speed around X axis"]
27965    pub xgyro: i16,
27966    #[doc = "Angular speed around Y axis"]
27967    pub ygyro: i16,
27968    #[doc = "Angular speed around Z axis"]
27969    pub zgyro: i16,
27970    #[doc = "X Magnetic field"]
27971    pub xmag: i16,
27972    #[doc = "Y Magnetic field"]
27973    pub ymag: i16,
27974    #[doc = "Z Magnetic field"]
27975    pub zmag: i16,
27976    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27978    pub temperature: i16,
27979}
27980impl SCALED_IMU3_DATA {
27981    pub const ENCODED_LEN: usize = 24usize;
27982    pub const DEFAULT: Self = Self {
27983        time_boot_ms: 0_u32,
27984        xacc: 0_i16,
27985        yacc: 0_i16,
27986        zacc: 0_i16,
27987        xgyro: 0_i16,
27988        ygyro: 0_i16,
27989        zgyro: 0_i16,
27990        xmag: 0_i16,
27991        ymag: 0_i16,
27992        zmag: 0_i16,
27993        temperature: 0_i16,
27994    };
27995    #[cfg(feature = "arbitrary")]
27996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27997        use arbitrary::{Arbitrary, Unstructured};
27998        let mut buf = [0u8; 1024];
27999        rng.fill_bytes(&mut buf);
28000        let mut unstructured = Unstructured::new(&buf);
28001        Self::arbitrary(&mut unstructured).unwrap_or_default()
28002    }
28003}
28004impl Default for SCALED_IMU3_DATA {
28005    fn default() -> Self {
28006        Self::DEFAULT.clone()
28007    }
28008}
28009impl MessageData for SCALED_IMU3_DATA {
28010    type Message = MavMessage;
28011    const ID: u32 = 129u32;
28012    const NAME: &'static str = "SCALED_IMU3";
28013    const EXTRA_CRC: u8 = 46u8;
28014    const ENCODED_LEN: usize = 24usize;
28015    fn deser(
28016        _version: MavlinkVersion,
28017        __input: &[u8],
28018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28019        let avail_len = __input.len();
28020        let mut payload_buf = [0; Self::ENCODED_LEN];
28021        let mut buf = if avail_len < Self::ENCODED_LEN {
28022            payload_buf[0..avail_len].copy_from_slice(__input);
28023            Bytes::new(&payload_buf)
28024        } else {
28025            Bytes::new(__input)
28026        };
28027        let mut __struct = Self::default();
28028        __struct.time_boot_ms = buf.get_u32_le();
28029        __struct.xacc = buf.get_i16_le();
28030        __struct.yacc = buf.get_i16_le();
28031        __struct.zacc = buf.get_i16_le();
28032        __struct.xgyro = buf.get_i16_le();
28033        __struct.ygyro = buf.get_i16_le();
28034        __struct.zgyro = buf.get_i16_le();
28035        __struct.xmag = buf.get_i16_le();
28036        __struct.ymag = buf.get_i16_le();
28037        __struct.zmag = buf.get_i16_le();
28038        __struct.temperature = buf.get_i16_le();
28039        Ok(__struct)
28040    }
28041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28042        let mut __tmp = BytesMut::new(bytes);
28043        #[allow(clippy::absurd_extreme_comparisons)]
28044        #[allow(unused_comparisons)]
28045        if __tmp.remaining() < Self::ENCODED_LEN {
28046            panic!(
28047                "buffer is too small (need {} bytes, but got {})",
28048                Self::ENCODED_LEN,
28049                __tmp.remaining(),
28050            )
28051        }
28052        __tmp.put_u32_le(self.time_boot_ms);
28053        __tmp.put_i16_le(self.xacc);
28054        __tmp.put_i16_le(self.yacc);
28055        __tmp.put_i16_le(self.zacc);
28056        __tmp.put_i16_le(self.xgyro);
28057        __tmp.put_i16_le(self.ygyro);
28058        __tmp.put_i16_le(self.zgyro);
28059        __tmp.put_i16_le(self.xmag);
28060        __tmp.put_i16_le(self.ymag);
28061        __tmp.put_i16_le(self.zmag);
28062        if matches!(version, MavlinkVersion::V2) {
28063            __tmp.put_i16_le(self.temperature);
28064            let len = __tmp.len();
28065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28066        } else {
28067            __tmp.len()
28068        }
28069    }
28070}
28071#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
28072#[doc = ""]
28073#[doc = "ID: 29"]
28074#[derive(Debug, Clone, PartialEq)]
28075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28077#[cfg_attr(feature = "ts", derive(TS))]
28078#[cfg_attr(feature = "ts", ts(export))]
28079pub struct SCALED_PRESSURE_DATA {
28080    #[doc = "Timestamp (time since system boot)."]
28081    pub time_boot_ms: u32,
28082    #[doc = "Absolute pressure"]
28083    pub press_abs: f32,
28084    #[doc = "Differential pressure 1"]
28085    pub press_diff: f32,
28086    #[doc = "Absolute pressure temperature"]
28087    pub temperature: i16,
28088    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28090    pub temperature_press_diff: i16,
28091}
28092impl SCALED_PRESSURE_DATA {
28093    pub const ENCODED_LEN: usize = 16usize;
28094    pub const DEFAULT: Self = Self {
28095        time_boot_ms: 0_u32,
28096        press_abs: 0.0_f32,
28097        press_diff: 0.0_f32,
28098        temperature: 0_i16,
28099        temperature_press_diff: 0_i16,
28100    };
28101    #[cfg(feature = "arbitrary")]
28102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28103        use arbitrary::{Arbitrary, Unstructured};
28104        let mut buf = [0u8; 1024];
28105        rng.fill_bytes(&mut buf);
28106        let mut unstructured = Unstructured::new(&buf);
28107        Self::arbitrary(&mut unstructured).unwrap_or_default()
28108    }
28109}
28110impl Default for SCALED_PRESSURE_DATA {
28111    fn default() -> Self {
28112        Self::DEFAULT.clone()
28113    }
28114}
28115impl MessageData for SCALED_PRESSURE_DATA {
28116    type Message = MavMessage;
28117    const ID: u32 = 29u32;
28118    const NAME: &'static str = "SCALED_PRESSURE";
28119    const EXTRA_CRC: u8 = 115u8;
28120    const ENCODED_LEN: usize = 16usize;
28121    fn deser(
28122        _version: MavlinkVersion,
28123        __input: &[u8],
28124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28125        let avail_len = __input.len();
28126        let mut payload_buf = [0; Self::ENCODED_LEN];
28127        let mut buf = if avail_len < Self::ENCODED_LEN {
28128            payload_buf[0..avail_len].copy_from_slice(__input);
28129            Bytes::new(&payload_buf)
28130        } else {
28131            Bytes::new(__input)
28132        };
28133        let mut __struct = Self::default();
28134        __struct.time_boot_ms = buf.get_u32_le();
28135        __struct.press_abs = buf.get_f32_le();
28136        __struct.press_diff = buf.get_f32_le();
28137        __struct.temperature = buf.get_i16_le();
28138        __struct.temperature_press_diff = buf.get_i16_le();
28139        Ok(__struct)
28140    }
28141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28142        let mut __tmp = BytesMut::new(bytes);
28143        #[allow(clippy::absurd_extreme_comparisons)]
28144        #[allow(unused_comparisons)]
28145        if __tmp.remaining() < Self::ENCODED_LEN {
28146            panic!(
28147                "buffer is too small (need {} bytes, but got {})",
28148                Self::ENCODED_LEN,
28149                __tmp.remaining(),
28150            )
28151        }
28152        __tmp.put_u32_le(self.time_boot_ms);
28153        __tmp.put_f32_le(self.press_abs);
28154        __tmp.put_f32_le(self.press_diff);
28155        __tmp.put_i16_le(self.temperature);
28156        if matches!(version, MavlinkVersion::V2) {
28157            __tmp.put_i16_le(self.temperature_press_diff);
28158            let len = __tmp.len();
28159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28160        } else {
28161            __tmp.len()
28162        }
28163    }
28164}
28165#[doc = "Barometer readings for 2nd barometer."]
28166#[doc = ""]
28167#[doc = "ID: 137"]
28168#[derive(Debug, Clone, PartialEq)]
28169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28171#[cfg_attr(feature = "ts", derive(TS))]
28172#[cfg_attr(feature = "ts", ts(export))]
28173pub struct SCALED_PRESSURE2_DATA {
28174    #[doc = "Timestamp (time since system boot)."]
28175    pub time_boot_ms: u32,
28176    #[doc = "Absolute pressure"]
28177    pub press_abs: f32,
28178    #[doc = "Differential pressure"]
28179    pub press_diff: f32,
28180    #[doc = "Absolute pressure temperature"]
28181    pub temperature: i16,
28182    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28184    pub temperature_press_diff: i16,
28185}
28186impl SCALED_PRESSURE2_DATA {
28187    pub const ENCODED_LEN: usize = 16usize;
28188    pub const DEFAULT: Self = Self {
28189        time_boot_ms: 0_u32,
28190        press_abs: 0.0_f32,
28191        press_diff: 0.0_f32,
28192        temperature: 0_i16,
28193        temperature_press_diff: 0_i16,
28194    };
28195    #[cfg(feature = "arbitrary")]
28196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28197        use arbitrary::{Arbitrary, Unstructured};
28198        let mut buf = [0u8; 1024];
28199        rng.fill_bytes(&mut buf);
28200        let mut unstructured = Unstructured::new(&buf);
28201        Self::arbitrary(&mut unstructured).unwrap_or_default()
28202    }
28203}
28204impl Default for SCALED_PRESSURE2_DATA {
28205    fn default() -> Self {
28206        Self::DEFAULT.clone()
28207    }
28208}
28209impl MessageData for SCALED_PRESSURE2_DATA {
28210    type Message = MavMessage;
28211    const ID: u32 = 137u32;
28212    const NAME: &'static str = "SCALED_PRESSURE2";
28213    const EXTRA_CRC: u8 = 195u8;
28214    const ENCODED_LEN: usize = 16usize;
28215    fn deser(
28216        _version: MavlinkVersion,
28217        __input: &[u8],
28218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28219        let avail_len = __input.len();
28220        let mut payload_buf = [0; Self::ENCODED_LEN];
28221        let mut buf = if avail_len < Self::ENCODED_LEN {
28222            payload_buf[0..avail_len].copy_from_slice(__input);
28223            Bytes::new(&payload_buf)
28224        } else {
28225            Bytes::new(__input)
28226        };
28227        let mut __struct = Self::default();
28228        __struct.time_boot_ms = buf.get_u32_le();
28229        __struct.press_abs = buf.get_f32_le();
28230        __struct.press_diff = buf.get_f32_le();
28231        __struct.temperature = buf.get_i16_le();
28232        __struct.temperature_press_diff = buf.get_i16_le();
28233        Ok(__struct)
28234    }
28235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28236        let mut __tmp = BytesMut::new(bytes);
28237        #[allow(clippy::absurd_extreme_comparisons)]
28238        #[allow(unused_comparisons)]
28239        if __tmp.remaining() < Self::ENCODED_LEN {
28240            panic!(
28241                "buffer is too small (need {} bytes, but got {})",
28242                Self::ENCODED_LEN,
28243                __tmp.remaining(),
28244            )
28245        }
28246        __tmp.put_u32_le(self.time_boot_ms);
28247        __tmp.put_f32_le(self.press_abs);
28248        __tmp.put_f32_le(self.press_diff);
28249        __tmp.put_i16_le(self.temperature);
28250        if matches!(version, MavlinkVersion::V2) {
28251            __tmp.put_i16_le(self.temperature_press_diff);
28252            let len = __tmp.len();
28253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28254        } else {
28255            __tmp.len()
28256        }
28257    }
28258}
28259#[doc = "Barometer readings for 3rd barometer."]
28260#[doc = ""]
28261#[doc = "ID: 143"]
28262#[derive(Debug, Clone, PartialEq)]
28263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28265#[cfg_attr(feature = "ts", derive(TS))]
28266#[cfg_attr(feature = "ts", ts(export))]
28267pub struct SCALED_PRESSURE3_DATA {
28268    #[doc = "Timestamp (time since system boot)."]
28269    pub time_boot_ms: u32,
28270    #[doc = "Absolute pressure"]
28271    pub press_abs: f32,
28272    #[doc = "Differential pressure"]
28273    pub press_diff: f32,
28274    #[doc = "Absolute pressure temperature"]
28275    pub temperature: i16,
28276    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28277    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28278    pub temperature_press_diff: i16,
28279}
28280impl SCALED_PRESSURE3_DATA {
28281    pub const ENCODED_LEN: usize = 16usize;
28282    pub const DEFAULT: Self = Self {
28283        time_boot_ms: 0_u32,
28284        press_abs: 0.0_f32,
28285        press_diff: 0.0_f32,
28286        temperature: 0_i16,
28287        temperature_press_diff: 0_i16,
28288    };
28289    #[cfg(feature = "arbitrary")]
28290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28291        use arbitrary::{Arbitrary, Unstructured};
28292        let mut buf = [0u8; 1024];
28293        rng.fill_bytes(&mut buf);
28294        let mut unstructured = Unstructured::new(&buf);
28295        Self::arbitrary(&mut unstructured).unwrap_or_default()
28296    }
28297}
28298impl Default for SCALED_PRESSURE3_DATA {
28299    fn default() -> Self {
28300        Self::DEFAULT.clone()
28301    }
28302}
28303impl MessageData for SCALED_PRESSURE3_DATA {
28304    type Message = MavMessage;
28305    const ID: u32 = 143u32;
28306    const NAME: &'static str = "SCALED_PRESSURE3";
28307    const EXTRA_CRC: u8 = 131u8;
28308    const ENCODED_LEN: usize = 16usize;
28309    fn deser(
28310        _version: MavlinkVersion,
28311        __input: &[u8],
28312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28313        let avail_len = __input.len();
28314        let mut payload_buf = [0; Self::ENCODED_LEN];
28315        let mut buf = if avail_len < Self::ENCODED_LEN {
28316            payload_buf[0..avail_len].copy_from_slice(__input);
28317            Bytes::new(&payload_buf)
28318        } else {
28319            Bytes::new(__input)
28320        };
28321        let mut __struct = Self::default();
28322        __struct.time_boot_ms = buf.get_u32_le();
28323        __struct.press_abs = buf.get_f32_le();
28324        __struct.press_diff = buf.get_f32_le();
28325        __struct.temperature = buf.get_i16_le();
28326        __struct.temperature_press_diff = buf.get_i16_le();
28327        Ok(__struct)
28328    }
28329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28330        let mut __tmp = BytesMut::new(bytes);
28331        #[allow(clippy::absurd_extreme_comparisons)]
28332        #[allow(unused_comparisons)]
28333        if __tmp.remaining() < Self::ENCODED_LEN {
28334            panic!(
28335                "buffer is too small (need {} bytes, but got {})",
28336                Self::ENCODED_LEN,
28337                __tmp.remaining(),
28338            )
28339        }
28340        __tmp.put_u32_le(self.time_boot_ms);
28341        __tmp.put_f32_le(self.press_abs);
28342        __tmp.put_f32_le(self.press_diff);
28343        __tmp.put_i16_le(self.temperature);
28344        if matches!(version, MavlinkVersion::V2) {
28345            __tmp.put_i16_le(self.temperature_press_diff);
28346            let len = __tmp.len();
28347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28348        } else {
28349            __tmp.len()
28350        }
28351    }
28352}
28353#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
28354#[doc = ""]
28355#[doc = "ID: 126"]
28356#[derive(Debug, Clone, PartialEq)]
28357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28359#[cfg_attr(feature = "ts", derive(TS))]
28360#[cfg_attr(feature = "ts", ts(export))]
28361pub struct SERIAL_CONTROL_DATA {
28362    #[doc = "Baudrate of transfer. Zero means no change."]
28363    pub baudrate: u32,
28364    #[doc = "Timeout for reply data"]
28365    pub timeout: u16,
28366    #[doc = "Serial control device type."]
28367    pub device: SerialControlDev,
28368    #[doc = "Bitmap of serial control flags."]
28369    pub flags: SerialControlFlag,
28370    #[doc = "how many bytes in this transfer"]
28371    pub count: u8,
28372    #[doc = "serial data"]
28373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28375    pub data: [u8; 70],
28376    #[doc = "System ID"]
28377    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28378    pub target_system: u8,
28379    #[doc = "Component ID"]
28380    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28381    pub target_component: u8,
28382}
28383impl SERIAL_CONTROL_DATA {
28384    pub const ENCODED_LEN: usize = 81usize;
28385    pub const DEFAULT: Self = Self {
28386        baudrate: 0_u32,
28387        timeout: 0_u16,
28388        device: SerialControlDev::DEFAULT,
28389        flags: SerialControlFlag::DEFAULT,
28390        count: 0_u8,
28391        data: [0_u8; 70usize],
28392        target_system: 0_u8,
28393        target_component: 0_u8,
28394    };
28395    #[cfg(feature = "arbitrary")]
28396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28397        use arbitrary::{Arbitrary, Unstructured};
28398        let mut buf = [0u8; 1024];
28399        rng.fill_bytes(&mut buf);
28400        let mut unstructured = Unstructured::new(&buf);
28401        Self::arbitrary(&mut unstructured).unwrap_or_default()
28402    }
28403}
28404impl Default for SERIAL_CONTROL_DATA {
28405    fn default() -> Self {
28406        Self::DEFAULT.clone()
28407    }
28408}
28409impl MessageData for SERIAL_CONTROL_DATA {
28410    type Message = MavMessage;
28411    const ID: u32 = 126u32;
28412    const NAME: &'static str = "SERIAL_CONTROL";
28413    const EXTRA_CRC: u8 = 220u8;
28414    const ENCODED_LEN: usize = 81usize;
28415    fn deser(
28416        _version: MavlinkVersion,
28417        __input: &[u8],
28418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28419        let avail_len = __input.len();
28420        let mut payload_buf = [0; Self::ENCODED_LEN];
28421        let mut buf = if avail_len < Self::ENCODED_LEN {
28422            payload_buf[0..avail_len].copy_from_slice(__input);
28423            Bytes::new(&payload_buf)
28424        } else {
28425            Bytes::new(__input)
28426        };
28427        let mut __struct = Self::default();
28428        __struct.baudrate = buf.get_u32_le();
28429        __struct.timeout = buf.get_u16_le();
28430        let tmp = buf.get_u8();
28431        __struct.device =
28432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28433                enum_type: "SerialControlDev",
28434                value: tmp as u32,
28435            })?;
28436        let tmp = buf.get_u8();
28437        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
28438            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28439                flag_type: "SerialControlFlag",
28440                value: tmp as u32,
28441            })?;
28442        __struct.count = buf.get_u8();
28443        for v in &mut __struct.data {
28444            let val = buf.get_u8();
28445            *v = val;
28446        }
28447        __struct.target_system = buf.get_u8();
28448        __struct.target_component = buf.get_u8();
28449        Ok(__struct)
28450    }
28451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28452        let mut __tmp = BytesMut::new(bytes);
28453        #[allow(clippy::absurd_extreme_comparisons)]
28454        #[allow(unused_comparisons)]
28455        if __tmp.remaining() < Self::ENCODED_LEN {
28456            panic!(
28457                "buffer is too small (need {} bytes, but got {})",
28458                Self::ENCODED_LEN,
28459                __tmp.remaining(),
28460            )
28461        }
28462        __tmp.put_u32_le(self.baudrate);
28463        __tmp.put_u16_le(self.timeout);
28464        __tmp.put_u8(self.device as u8);
28465        __tmp.put_u8(self.flags.bits());
28466        __tmp.put_u8(self.count);
28467        for val in &self.data {
28468            __tmp.put_u8(*val);
28469        }
28470        if matches!(version, MavlinkVersion::V2) {
28471            __tmp.put_u8(self.target_system);
28472            __tmp.put_u8(self.target_component);
28473            let len = __tmp.len();
28474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28475        } else {
28476            __tmp.len()
28477        }
28478    }
28479}
28480#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28481#[doc = ""]
28482#[doc = "ID: 36"]
28483#[derive(Debug, Clone, PartialEq)]
28484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28486#[cfg_attr(feature = "ts", derive(TS))]
28487#[cfg_attr(feature = "ts", ts(export))]
28488pub struct SERVO_OUTPUT_RAW_DATA {
28489    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28490    pub time_usec: u32,
28491    #[doc = "Servo output 1 value"]
28492    pub servo1_raw: u16,
28493    #[doc = "Servo output 2 value"]
28494    pub servo2_raw: u16,
28495    #[doc = "Servo output 3 value"]
28496    pub servo3_raw: u16,
28497    #[doc = "Servo output 4 value"]
28498    pub servo4_raw: u16,
28499    #[doc = "Servo output 5 value"]
28500    pub servo5_raw: u16,
28501    #[doc = "Servo output 6 value"]
28502    pub servo6_raw: u16,
28503    #[doc = "Servo output 7 value"]
28504    pub servo7_raw: u16,
28505    #[doc = "Servo output 8 value"]
28506    pub servo8_raw: u16,
28507    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28508    pub port: u8,
28509    #[doc = "Servo output 9 value"]
28510    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28511    pub servo9_raw: u16,
28512    #[doc = "Servo output 10 value"]
28513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28514    pub servo10_raw: u16,
28515    #[doc = "Servo output 11 value"]
28516    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28517    pub servo11_raw: u16,
28518    #[doc = "Servo output 12 value"]
28519    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28520    pub servo12_raw: u16,
28521    #[doc = "Servo output 13 value"]
28522    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28523    pub servo13_raw: u16,
28524    #[doc = "Servo output 14 value"]
28525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28526    pub servo14_raw: u16,
28527    #[doc = "Servo output 15 value"]
28528    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28529    pub servo15_raw: u16,
28530    #[doc = "Servo output 16 value"]
28531    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28532    pub servo16_raw: u16,
28533}
28534impl SERVO_OUTPUT_RAW_DATA {
28535    pub const ENCODED_LEN: usize = 37usize;
28536    pub const DEFAULT: Self = Self {
28537        time_usec: 0_u32,
28538        servo1_raw: 0_u16,
28539        servo2_raw: 0_u16,
28540        servo3_raw: 0_u16,
28541        servo4_raw: 0_u16,
28542        servo5_raw: 0_u16,
28543        servo6_raw: 0_u16,
28544        servo7_raw: 0_u16,
28545        servo8_raw: 0_u16,
28546        port: 0_u8,
28547        servo9_raw: 0_u16,
28548        servo10_raw: 0_u16,
28549        servo11_raw: 0_u16,
28550        servo12_raw: 0_u16,
28551        servo13_raw: 0_u16,
28552        servo14_raw: 0_u16,
28553        servo15_raw: 0_u16,
28554        servo16_raw: 0_u16,
28555    };
28556    #[cfg(feature = "arbitrary")]
28557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28558        use arbitrary::{Arbitrary, Unstructured};
28559        let mut buf = [0u8; 1024];
28560        rng.fill_bytes(&mut buf);
28561        let mut unstructured = Unstructured::new(&buf);
28562        Self::arbitrary(&mut unstructured).unwrap_or_default()
28563    }
28564}
28565impl Default for SERVO_OUTPUT_RAW_DATA {
28566    fn default() -> Self {
28567        Self::DEFAULT.clone()
28568    }
28569}
28570impl MessageData for SERVO_OUTPUT_RAW_DATA {
28571    type Message = MavMessage;
28572    const ID: u32 = 36u32;
28573    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28574    const EXTRA_CRC: u8 = 222u8;
28575    const ENCODED_LEN: usize = 37usize;
28576    fn deser(
28577        _version: MavlinkVersion,
28578        __input: &[u8],
28579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28580        let avail_len = __input.len();
28581        let mut payload_buf = [0; Self::ENCODED_LEN];
28582        let mut buf = if avail_len < Self::ENCODED_LEN {
28583            payload_buf[0..avail_len].copy_from_slice(__input);
28584            Bytes::new(&payload_buf)
28585        } else {
28586            Bytes::new(__input)
28587        };
28588        let mut __struct = Self::default();
28589        __struct.time_usec = buf.get_u32_le();
28590        __struct.servo1_raw = buf.get_u16_le();
28591        __struct.servo2_raw = buf.get_u16_le();
28592        __struct.servo3_raw = buf.get_u16_le();
28593        __struct.servo4_raw = buf.get_u16_le();
28594        __struct.servo5_raw = buf.get_u16_le();
28595        __struct.servo6_raw = buf.get_u16_le();
28596        __struct.servo7_raw = buf.get_u16_le();
28597        __struct.servo8_raw = buf.get_u16_le();
28598        __struct.port = buf.get_u8();
28599        __struct.servo9_raw = buf.get_u16_le();
28600        __struct.servo10_raw = buf.get_u16_le();
28601        __struct.servo11_raw = buf.get_u16_le();
28602        __struct.servo12_raw = buf.get_u16_le();
28603        __struct.servo13_raw = buf.get_u16_le();
28604        __struct.servo14_raw = buf.get_u16_le();
28605        __struct.servo15_raw = buf.get_u16_le();
28606        __struct.servo16_raw = buf.get_u16_le();
28607        Ok(__struct)
28608    }
28609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28610        let mut __tmp = BytesMut::new(bytes);
28611        #[allow(clippy::absurd_extreme_comparisons)]
28612        #[allow(unused_comparisons)]
28613        if __tmp.remaining() < Self::ENCODED_LEN {
28614            panic!(
28615                "buffer is too small (need {} bytes, but got {})",
28616                Self::ENCODED_LEN,
28617                __tmp.remaining(),
28618            )
28619        }
28620        __tmp.put_u32_le(self.time_usec);
28621        __tmp.put_u16_le(self.servo1_raw);
28622        __tmp.put_u16_le(self.servo2_raw);
28623        __tmp.put_u16_le(self.servo3_raw);
28624        __tmp.put_u16_le(self.servo4_raw);
28625        __tmp.put_u16_le(self.servo5_raw);
28626        __tmp.put_u16_le(self.servo6_raw);
28627        __tmp.put_u16_le(self.servo7_raw);
28628        __tmp.put_u16_le(self.servo8_raw);
28629        __tmp.put_u8(self.port);
28630        if matches!(version, MavlinkVersion::V2) {
28631            __tmp.put_u16_le(self.servo9_raw);
28632            __tmp.put_u16_le(self.servo10_raw);
28633            __tmp.put_u16_le(self.servo11_raw);
28634            __tmp.put_u16_le(self.servo12_raw);
28635            __tmp.put_u16_le(self.servo13_raw);
28636            __tmp.put_u16_le(self.servo14_raw);
28637            __tmp.put_u16_le(self.servo15_raw);
28638            __tmp.put_u16_le(self.servo16_raw);
28639            let len = __tmp.len();
28640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28641        } else {
28642            __tmp.len()
28643        }
28644    }
28645}
28646#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28647#[doc = ""]
28648#[doc = "ID: 256"]
28649#[derive(Debug, Clone, PartialEq)]
28650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28652#[cfg_attr(feature = "ts", derive(TS))]
28653#[cfg_attr(feature = "ts", ts(export))]
28654pub struct SETUP_SIGNING_DATA {
28655    #[doc = "initial timestamp"]
28656    pub initial_timestamp: u64,
28657    #[doc = "system id of the target"]
28658    pub target_system: u8,
28659    #[doc = "component ID of the target"]
28660    pub target_component: u8,
28661    #[doc = "signing key"]
28662    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28663    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28664    pub secret_key: [u8; 32],
28665}
28666impl SETUP_SIGNING_DATA {
28667    pub const ENCODED_LEN: usize = 42usize;
28668    pub const DEFAULT: Self = Self {
28669        initial_timestamp: 0_u64,
28670        target_system: 0_u8,
28671        target_component: 0_u8,
28672        secret_key: [0_u8; 32usize],
28673    };
28674    #[cfg(feature = "arbitrary")]
28675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28676        use arbitrary::{Arbitrary, Unstructured};
28677        let mut buf = [0u8; 1024];
28678        rng.fill_bytes(&mut buf);
28679        let mut unstructured = Unstructured::new(&buf);
28680        Self::arbitrary(&mut unstructured).unwrap_or_default()
28681    }
28682}
28683impl Default for SETUP_SIGNING_DATA {
28684    fn default() -> Self {
28685        Self::DEFAULT.clone()
28686    }
28687}
28688impl MessageData for SETUP_SIGNING_DATA {
28689    type Message = MavMessage;
28690    const ID: u32 = 256u32;
28691    const NAME: &'static str = "SETUP_SIGNING";
28692    const EXTRA_CRC: u8 = 71u8;
28693    const ENCODED_LEN: usize = 42usize;
28694    fn deser(
28695        _version: MavlinkVersion,
28696        __input: &[u8],
28697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28698        let avail_len = __input.len();
28699        let mut payload_buf = [0; Self::ENCODED_LEN];
28700        let mut buf = if avail_len < Self::ENCODED_LEN {
28701            payload_buf[0..avail_len].copy_from_slice(__input);
28702            Bytes::new(&payload_buf)
28703        } else {
28704            Bytes::new(__input)
28705        };
28706        let mut __struct = Self::default();
28707        __struct.initial_timestamp = buf.get_u64_le();
28708        __struct.target_system = buf.get_u8();
28709        __struct.target_component = buf.get_u8();
28710        for v in &mut __struct.secret_key {
28711            let val = buf.get_u8();
28712            *v = val;
28713        }
28714        Ok(__struct)
28715    }
28716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28717        let mut __tmp = BytesMut::new(bytes);
28718        #[allow(clippy::absurd_extreme_comparisons)]
28719        #[allow(unused_comparisons)]
28720        if __tmp.remaining() < Self::ENCODED_LEN {
28721            panic!(
28722                "buffer is too small (need {} bytes, but got {})",
28723                Self::ENCODED_LEN,
28724                __tmp.remaining(),
28725            )
28726        }
28727        __tmp.put_u64_le(self.initial_timestamp);
28728        __tmp.put_u8(self.target_system);
28729        __tmp.put_u8(self.target_component);
28730        for val in &self.secret_key {
28731            __tmp.put_u8(*val);
28732        }
28733        if matches!(version, MavlinkVersion::V2) {
28734            let len = __tmp.len();
28735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28736        } else {
28737            __tmp.len()
28738        }
28739    }
28740}
28741#[doc = "Set the vehicle attitude and body angular rates."]
28742#[doc = ""]
28743#[doc = "ID: 139"]
28744#[derive(Debug, Clone, PartialEq)]
28745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28747#[cfg_attr(feature = "ts", derive(TS))]
28748#[cfg_attr(feature = "ts", ts(export))]
28749pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28750    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28751    pub time_usec: u64,
28752    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28753    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28754    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28755    pub controls: [f32; 8],
28756    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28757    pub group_mlx: u8,
28758    #[doc = "System ID"]
28759    pub target_system: u8,
28760    #[doc = "Component ID"]
28761    pub target_component: u8,
28762}
28763impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28764    pub const ENCODED_LEN: usize = 43usize;
28765    pub const DEFAULT: Self = Self {
28766        time_usec: 0_u64,
28767        controls: [0.0_f32; 8usize],
28768        group_mlx: 0_u8,
28769        target_system: 0_u8,
28770        target_component: 0_u8,
28771    };
28772    #[cfg(feature = "arbitrary")]
28773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28774        use arbitrary::{Arbitrary, Unstructured};
28775        let mut buf = [0u8; 1024];
28776        rng.fill_bytes(&mut buf);
28777        let mut unstructured = Unstructured::new(&buf);
28778        Self::arbitrary(&mut unstructured).unwrap_or_default()
28779    }
28780}
28781impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28782    fn default() -> Self {
28783        Self::DEFAULT.clone()
28784    }
28785}
28786impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28787    type Message = MavMessage;
28788    const ID: u32 = 139u32;
28789    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28790    const EXTRA_CRC: u8 = 168u8;
28791    const ENCODED_LEN: usize = 43usize;
28792    fn deser(
28793        _version: MavlinkVersion,
28794        __input: &[u8],
28795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28796        let avail_len = __input.len();
28797        let mut payload_buf = [0; Self::ENCODED_LEN];
28798        let mut buf = if avail_len < Self::ENCODED_LEN {
28799            payload_buf[0..avail_len].copy_from_slice(__input);
28800            Bytes::new(&payload_buf)
28801        } else {
28802            Bytes::new(__input)
28803        };
28804        let mut __struct = Self::default();
28805        __struct.time_usec = buf.get_u64_le();
28806        for v in &mut __struct.controls {
28807            let val = buf.get_f32_le();
28808            *v = val;
28809        }
28810        __struct.group_mlx = buf.get_u8();
28811        __struct.target_system = buf.get_u8();
28812        __struct.target_component = buf.get_u8();
28813        Ok(__struct)
28814    }
28815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28816        let mut __tmp = BytesMut::new(bytes);
28817        #[allow(clippy::absurd_extreme_comparisons)]
28818        #[allow(unused_comparisons)]
28819        if __tmp.remaining() < Self::ENCODED_LEN {
28820            panic!(
28821                "buffer is too small (need {} bytes, but got {})",
28822                Self::ENCODED_LEN,
28823                __tmp.remaining(),
28824            )
28825        }
28826        __tmp.put_u64_le(self.time_usec);
28827        for val in &self.controls {
28828            __tmp.put_f32_le(*val);
28829        }
28830        __tmp.put_u8(self.group_mlx);
28831        __tmp.put_u8(self.target_system);
28832        __tmp.put_u8(self.target_component);
28833        if matches!(version, MavlinkVersion::V2) {
28834            let len = __tmp.len();
28835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28836        } else {
28837            __tmp.len()
28838        }
28839    }
28840}
28841#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28842#[doc = ""]
28843#[doc = "ID: 82"]
28844#[derive(Debug, Clone, PartialEq)]
28845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28847#[cfg_attr(feature = "ts", derive(TS))]
28848#[cfg_attr(feature = "ts", ts(export))]
28849pub struct SET_ATTITUDE_TARGET_DATA {
28850    #[doc = "Timestamp (time since system boot)."]
28851    pub time_boot_ms: u32,
28852    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28855    pub q: [f32; 4],
28856    #[doc = "Body roll rate"]
28857    pub body_roll_rate: f32,
28858    #[doc = "Body pitch rate"]
28859    pub body_pitch_rate: f32,
28860    #[doc = "Body yaw rate"]
28861    pub body_yaw_rate: f32,
28862    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28863    pub thrust: f32,
28864    #[doc = "System ID"]
28865    pub target_system: u8,
28866    #[doc = "Component ID"]
28867    pub target_component: u8,
28868    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28869    pub type_mask: AttitudeTargetTypemask,
28870    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28871    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28872    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28873    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28874    pub thrust_body: [f32; 3],
28875}
28876impl SET_ATTITUDE_TARGET_DATA {
28877    pub const ENCODED_LEN: usize = 51usize;
28878    pub const DEFAULT: Self = Self {
28879        time_boot_ms: 0_u32,
28880        q: [0.0_f32; 4usize],
28881        body_roll_rate: 0.0_f32,
28882        body_pitch_rate: 0.0_f32,
28883        body_yaw_rate: 0.0_f32,
28884        thrust: 0.0_f32,
28885        target_system: 0_u8,
28886        target_component: 0_u8,
28887        type_mask: AttitudeTargetTypemask::DEFAULT,
28888        thrust_body: [0.0_f32; 3usize],
28889    };
28890    #[cfg(feature = "arbitrary")]
28891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28892        use arbitrary::{Arbitrary, Unstructured};
28893        let mut buf = [0u8; 1024];
28894        rng.fill_bytes(&mut buf);
28895        let mut unstructured = Unstructured::new(&buf);
28896        Self::arbitrary(&mut unstructured).unwrap_or_default()
28897    }
28898}
28899impl Default for SET_ATTITUDE_TARGET_DATA {
28900    fn default() -> Self {
28901        Self::DEFAULT.clone()
28902    }
28903}
28904impl MessageData for SET_ATTITUDE_TARGET_DATA {
28905    type Message = MavMessage;
28906    const ID: u32 = 82u32;
28907    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28908    const EXTRA_CRC: u8 = 49u8;
28909    const ENCODED_LEN: usize = 51usize;
28910    fn deser(
28911        _version: MavlinkVersion,
28912        __input: &[u8],
28913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28914        let avail_len = __input.len();
28915        let mut payload_buf = [0; Self::ENCODED_LEN];
28916        let mut buf = if avail_len < Self::ENCODED_LEN {
28917            payload_buf[0..avail_len].copy_from_slice(__input);
28918            Bytes::new(&payload_buf)
28919        } else {
28920            Bytes::new(__input)
28921        };
28922        let mut __struct = Self::default();
28923        __struct.time_boot_ms = buf.get_u32_le();
28924        for v in &mut __struct.q {
28925            let val = buf.get_f32_le();
28926            *v = val;
28927        }
28928        __struct.body_roll_rate = buf.get_f32_le();
28929        __struct.body_pitch_rate = buf.get_f32_le();
28930        __struct.body_yaw_rate = buf.get_f32_le();
28931        __struct.thrust = buf.get_f32_le();
28932        __struct.target_system = buf.get_u8();
28933        __struct.target_component = buf.get_u8();
28934        let tmp = buf.get_u8();
28935        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28936            tmp & AttitudeTargetTypemask::all().bits(),
28937        )
28938        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28939            flag_type: "AttitudeTargetTypemask",
28940            value: tmp as u32,
28941        })?;
28942        for v in &mut __struct.thrust_body {
28943            let val = buf.get_f32_le();
28944            *v = val;
28945        }
28946        Ok(__struct)
28947    }
28948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28949        let mut __tmp = BytesMut::new(bytes);
28950        #[allow(clippy::absurd_extreme_comparisons)]
28951        #[allow(unused_comparisons)]
28952        if __tmp.remaining() < Self::ENCODED_LEN {
28953            panic!(
28954                "buffer is too small (need {} bytes, but got {})",
28955                Self::ENCODED_LEN,
28956                __tmp.remaining(),
28957            )
28958        }
28959        __tmp.put_u32_le(self.time_boot_ms);
28960        for val in &self.q {
28961            __tmp.put_f32_le(*val);
28962        }
28963        __tmp.put_f32_le(self.body_roll_rate);
28964        __tmp.put_f32_le(self.body_pitch_rate);
28965        __tmp.put_f32_le(self.body_yaw_rate);
28966        __tmp.put_f32_le(self.thrust);
28967        __tmp.put_u8(self.target_system);
28968        __tmp.put_u8(self.target_component);
28969        __tmp.put_u8(self.type_mask.bits());
28970        if matches!(version, MavlinkVersion::V2) {
28971            for val in &self.thrust_body {
28972                __tmp.put_f32_le(*val);
28973            }
28974            let len = __tmp.len();
28975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28976        } else {
28977            __tmp.len()
28978        }
28979    }
28980}
28981#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28982#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28983#[doc = ""]
28984#[doc = "ID: 48"]
28985#[derive(Debug, Clone, PartialEq)]
28986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28988#[cfg_attr(feature = "ts", derive(TS))]
28989#[cfg_attr(feature = "ts", ts(export))]
28990pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28991    #[doc = "Latitude (WGS84)"]
28992    pub latitude: i32,
28993    #[doc = "Longitude (WGS84)"]
28994    pub longitude: i32,
28995    #[doc = "Altitude (MSL). Positive for up."]
28996    pub altitude: i32,
28997    #[doc = "System ID"]
28998    pub target_system: u8,
28999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29001    pub time_usec: u64,
29002}
29003impl SET_GPS_GLOBAL_ORIGIN_DATA {
29004    pub const ENCODED_LEN: usize = 21usize;
29005    pub const DEFAULT: Self = Self {
29006        latitude: 0_i32,
29007        longitude: 0_i32,
29008        altitude: 0_i32,
29009        target_system: 0_u8,
29010        time_usec: 0_u64,
29011    };
29012    #[cfg(feature = "arbitrary")]
29013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29014        use arbitrary::{Arbitrary, Unstructured};
29015        let mut buf = [0u8; 1024];
29016        rng.fill_bytes(&mut buf);
29017        let mut unstructured = Unstructured::new(&buf);
29018        Self::arbitrary(&mut unstructured).unwrap_or_default()
29019    }
29020}
29021impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29022    fn default() -> Self {
29023        Self::DEFAULT.clone()
29024    }
29025}
29026impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29027    type Message = MavMessage;
29028    const ID: u32 = 48u32;
29029    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29030    const EXTRA_CRC: u8 = 41u8;
29031    const ENCODED_LEN: usize = 21usize;
29032    fn deser(
29033        _version: MavlinkVersion,
29034        __input: &[u8],
29035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29036        let avail_len = __input.len();
29037        let mut payload_buf = [0; Self::ENCODED_LEN];
29038        let mut buf = if avail_len < Self::ENCODED_LEN {
29039            payload_buf[0..avail_len].copy_from_slice(__input);
29040            Bytes::new(&payload_buf)
29041        } else {
29042            Bytes::new(__input)
29043        };
29044        let mut __struct = Self::default();
29045        __struct.latitude = buf.get_i32_le();
29046        __struct.longitude = buf.get_i32_le();
29047        __struct.altitude = buf.get_i32_le();
29048        __struct.target_system = buf.get_u8();
29049        __struct.time_usec = buf.get_u64_le();
29050        Ok(__struct)
29051    }
29052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29053        let mut __tmp = BytesMut::new(bytes);
29054        #[allow(clippy::absurd_extreme_comparisons)]
29055        #[allow(unused_comparisons)]
29056        if __tmp.remaining() < Self::ENCODED_LEN {
29057            panic!(
29058                "buffer is too small (need {} bytes, but got {})",
29059                Self::ENCODED_LEN,
29060                __tmp.remaining(),
29061            )
29062        }
29063        __tmp.put_i32_le(self.latitude);
29064        __tmp.put_i32_le(self.longitude);
29065        __tmp.put_i32_le(self.altitude);
29066        __tmp.put_u8(self.target_system);
29067        if matches!(version, MavlinkVersion::V2) {
29068            __tmp.put_u64_le(self.time_usec);
29069            let len = __tmp.len();
29070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29071        } else {
29072            __tmp.len()
29073        }
29074    }
29075}
29076#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29077#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29078#[doc = ""]
29079#[doc = "ID: 243"]
29080#[derive(Debug, Clone, PartialEq)]
29081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29083#[cfg_attr(feature = "ts", derive(TS))]
29084#[cfg_attr(feature = "ts", ts(export))]
29085pub struct SET_HOME_POSITION_DATA {
29086    #[doc = "Latitude (WGS84)"]
29087    pub latitude: i32,
29088    #[doc = "Longitude (WGS84)"]
29089    pub longitude: i32,
29090    #[doc = "Altitude (MSL). Positive for up."]
29091    pub altitude: i32,
29092    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29093    pub x: f32,
29094    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29095    pub y: f32,
29096    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29097    pub z: f32,
29098    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29099    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29100    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29101    pub q: [f32; 4],
29102    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29103    pub approach_x: f32,
29104    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29105    pub approach_y: f32,
29106    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29107    pub approach_z: f32,
29108    #[doc = "System ID."]
29109    pub target_system: u8,
29110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29111    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29112    pub time_usec: u64,
29113}
29114impl SET_HOME_POSITION_DATA {
29115    pub const ENCODED_LEN: usize = 61usize;
29116    pub const DEFAULT: Self = Self {
29117        latitude: 0_i32,
29118        longitude: 0_i32,
29119        altitude: 0_i32,
29120        x: 0.0_f32,
29121        y: 0.0_f32,
29122        z: 0.0_f32,
29123        q: [0.0_f32; 4usize],
29124        approach_x: 0.0_f32,
29125        approach_y: 0.0_f32,
29126        approach_z: 0.0_f32,
29127        target_system: 0_u8,
29128        time_usec: 0_u64,
29129    };
29130    #[cfg(feature = "arbitrary")]
29131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29132        use arbitrary::{Arbitrary, Unstructured};
29133        let mut buf = [0u8; 1024];
29134        rng.fill_bytes(&mut buf);
29135        let mut unstructured = Unstructured::new(&buf);
29136        Self::arbitrary(&mut unstructured).unwrap_or_default()
29137    }
29138}
29139impl Default for SET_HOME_POSITION_DATA {
29140    fn default() -> Self {
29141        Self::DEFAULT.clone()
29142    }
29143}
29144impl MessageData for SET_HOME_POSITION_DATA {
29145    type Message = MavMessage;
29146    const ID: u32 = 243u32;
29147    const NAME: &'static str = "SET_HOME_POSITION";
29148    const EXTRA_CRC: u8 = 85u8;
29149    const ENCODED_LEN: usize = 61usize;
29150    fn deser(
29151        _version: MavlinkVersion,
29152        __input: &[u8],
29153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29154        let avail_len = __input.len();
29155        let mut payload_buf = [0; Self::ENCODED_LEN];
29156        let mut buf = if avail_len < Self::ENCODED_LEN {
29157            payload_buf[0..avail_len].copy_from_slice(__input);
29158            Bytes::new(&payload_buf)
29159        } else {
29160            Bytes::new(__input)
29161        };
29162        let mut __struct = Self::default();
29163        __struct.latitude = buf.get_i32_le();
29164        __struct.longitude = buf.get_i32_le();
29165        __struct.altitude = buf.get_i32_le();
29166        __struct.x = buf.get_f32_le();
29167        __struct.y = buf.get_f32_le();
29168        __struct.z = buf.get_f32_le();
29169        for v in &mut __struct.q {
29170            let val = buf.get_f32_le();
29171            *v = val;
29172        }
29173        __struct.approach_x = buf.get_f32_le();
29174        __struct.approach_y = buf.get_f32_le();
29175        __struct.approach_z = buf.get_f32_le();
29176        __struct.target_system = buf.get_u8();
29177        __struct.time_usec = buf.get_u64_le();
29178        Ok(__struct)
29179    }
29180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29181        let mut __tmp = BytesMut::new(bytes);
29182        #[allow(clippy::absurd_extreme_comparisons)]
29183        #[allow(unused_comparisons)]
29184        if __tmp.remaining() < Self::ENCODED_LEN {
29185            panic!(
29186                "buffer is too small (need {} bytes, but got {})",
29187                Self::ENCODED_LEN,
29188                __tmp.remaining(),
29189            )
29190        }
29191        __tmp.put_i32_le(self.latitude);
29192        __tmp.put_i32_le(self.longitude);
29193        __tmp.put_i32_le(self.altitude);
29194        __tmp.put_f32_le(self.x);
29195        __tmp.put_f32_le(self.y);
29196        __tmp.put_f32_le(self.z);
29197        for val in &self.q {
29198            __tmp.put_f32_le(*val);
29199        }
29200        __tmp.put_f32_le(self.approach_x);
29201        __tmp.put_f32_le(self.approach_y);
29202        __tmp.put_f32_le(self.approach_z);
29203        __tmp.put_u8(self.target_system);
29204        if matches!(version, MavlinkVersion::V2) {
29205            __tmp.put_u64_le(self.time_usec);
29206            let len = __tmp.len();
29207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29208        } else {
29209            __tmp.len()
29210        }
29211    }
29212}
29213#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
29214#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
29215#[doc = ""]
29216#[doc = "ID: 11"]
29217#[derive(Debug, Clone, PartialEq)]
29218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29220#[cfg_attr(feature = "ts", derive(TS))]
29221#[cfg_attr(feature = "ts", ts(export))]
29222pub struct SET_MODE_DATA {
29223    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
29224    pub custom_mode: u32,
29225    #[doc = "The system setting the mode"]
29226    pub target_system: u8,
29227    #[doc = "The new base mode."]
29228    pub base_mode: MavMode,
29229}
29230impl SET_MODE_DATA {
29231    pub const ENCODED_LEN: usize = 6usize;
29232    pub const DEFAULT: Self = Self {
29233        custom_mode: 0_u32,
29234        target_system: 0_u8,
29235        base_mode: MavMode::DEFAULT,
29236    };
29237    #[cfg(feature = "arbitrary")]
29238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29239        use arbitrary::{Arbitrary, Unstructured};
29240        let mut buf = [0u8; 1024];
29241        rng.fill_bytes(&mut buf);
29242        let mut unstructured = Unstructured::new(&buf);
29243        Self::arbitrary(&mut unstructured).unwrap_or_default()
29244    }
29245}
29246impl Default for SET_MODE_DATA {
29247    fn default() -> Self {
29248        Self::DEFAULT.clone()
29249    }
29250}
29251impl MessageData for SET_MODE_DATA {
29252    type Message = MavMessage;
29253    const ID: u32 = 11u32;
29254    const NAME: &'static str = "SET_MODE";
29255    const EXTRA_CRC: u8 = 89u8;
29256    const ENCODED_LEN: usize = 6usize;
29257    fn deser(
29258        _version: MavlinkVersion,
29259        __input: &[u8],
29260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29261        let avail_len = __input.len();
29262        let mut payload_buf = [0; Self::ENCODED_LEN];
29263        let mut buf = if avail_len < Self::ENCODED_LEN {
29264            payload_buf[0..avail_len].copy_from_slice(__input);
29265            Bytes::new(&payload_buf)
29266        } else {
29267            Bytes::new(__input)
29268        };
29269        let mut __struct = Self::default();
29270        __struct.custom_mode = buf.get_u32_le();
29271        __struct.target_system = buf.get_u8();
29272        let tmp = buf.get_u8();
29273        __struct.base_mode =
29274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29275                enum_type: "MavMode",
29276                value: tmp as u32,
29277            })?;
29278        Ok(__struct)
29279    }
29280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29281        let mut __tmp = BytesMut::new(bytes);
29282        #[allow(clippy::absurd_extreme_comparisons)]
29283        #[allow(unused_comparisons)]
29284        if __tmp.remaining() < Self::ENCODED_LEN {
29285            panic!(
29286                "buffer is too small (need {} bytes, but got {})",
29287                Self::ENCODED_LEN,
29288                __tmp.remaining(),
29289            )
29290        }
29291        __tmp.put_u32_le(self.custom_mode);
29292        __tmp.put_u8(self.target_system);
29293        __tmp.put_u8(self.base_mode as u8);
29294        if matches!(version, MavlinkVersion::V2) {
29295            let len = __tmp.len();
29296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29297        } else {
29298            __tmp.len()
29299        }
29300    }
29301}
29302#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29303#[doc = ""]
29304#[doc = "ID: 86"]
29305#[derive(Debug, Clone, PartialEq)]
29306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29308#[cfg_attr(feature = "ts", derive(TS))]
29309#[cfg_attr(feature = "ts", ts(export))]
29310pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29311    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29312    pub time_boot_ms: u32,
29313    #[doc = "Latitude in WGS84 frame"]
29314    pub lat_int: i32,
29315    #[doc = "Longitude in WGS84 frame"]
29316    pub lon_int: i32,
29317    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29318    pub alt: f32,
29319    #[doc = "X velocity in NED frame"]
29320    pub vx: f32,
29321    #[doc = "Y velocity in NED frame"]
29322    pub vy: f32,
29323    #[doc = "Z velocity in NED frame"]
29324    pub vz: f32,
29325    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29326    pub afx: f32,
29327    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29328    pub afy: f32,
29329    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29330    pub afz: f32,
29331    #[doc = "yaw setpoint"]
29332    pub yaw: f32,
29333    #[doc = "yaw rate setpoint"]
29334    pub yaw_rate: f32,
29335    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29336    pub type_mask: PositionTargetTypemask,
29337    #[doc = "System ID"]
29338    pub target_system: u8,
29339    #[doc = "Component ID"]
29340    pub target_component: u8,
29341    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29342    pub coordinate_frame: MavFrame,
29343}
29344impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29345    pub const ENCODED_LEN: usize = 53usize;
29346    pub const DEFAULT: Self = Self {
29347        time_boot_ms: 0_u32,
29348        lat_int: 0_i32,
29349        lon_int: 0_i32,
29350        alt: 0.0_f32,
29351        vx: 0.0_f32,
29352        vy: 0.0_f32,
29353        vz: 0.0_f32,
29354        afx: 0.0_f32,
29355        afy: 0.0_f32,
29356        afz: 0.0_f32,
29357        yaw: 0.0_f32,
29358        yaw_rate: 0.0_f32,
29359        type_mask: PositionTargetTypemask::DEFAULT,
29360        target_system: 0_u8,
29361        target_component: 0_u8,
29362        coordinate_frame: MavFrame::DEFAULT,
29363    };
29364    #[cfg(feature = "arbitrary")]
29365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29366        use arbitrary::{Arbitrary, Unstructured};
29367        let mut buf = [0u8; 1024];
29368        rng.fill_bytes(&mut buf);
29369        let mut unstructured = Unstructured::new(&buf);
29370        Self::arbitrary(&mut unstructured).unwrap_or_default()
29371    }
29372}
29373impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29374    fn default() -> Self {
29375        Self::DEFAULT.clone()
29376    }
29377}
29378impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29379    type Message = MavMessage;
29380    const ID: u32 = 86u32;
29381    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29382    const EXTRA_CRC: u8 = 5u8;
29383    const ENCODED_LEN: usize = 53usize;
29384    fn deser(
29385        _version: MavlinkVersion,
29386        __input: &[u8],
29387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29388        let avail_len = __input.len();
29389        let mut payload_buf = [0; Self::ENCODED_LEN];
29390        let mut buf = if avail_len < Self::ENCODED_LEN {
29391            payload_buf[0..avail_len].copy_from_slice(__input);
29392            Bytes::new(&payload_buf)
29393        } else {
29394            Bytes::new(__input)
29395        };
29396        let mut __struct = Self::default();
29397        __struct.time_boot_ms = buf.get_u32_le();
29398        __struct.lat_int = buf.get_i32_le();
29399        __struct.lon_int = buf.get_i32_le();
29400        __struct.alt = buf.get_f32_le();
29401        __struct.vx = buf.get_f32_le();
29402        __struct.vy = buf.get_f32_le();
29403        __struct.vz = buf.get_f32_le();
29404        __struct.afx = buf.get_f32_le();
29405        __struct.afy = buf.get_f32_le();
29406        __struct.afz = buf.get_f32_le();
29407        __struct.yaw = buf.get_f32_le();
29408        __struct.yaw_rate = buf.get_f32_le();
29409        let tmp = buf.get_u16_le();
29410        __struct.type_mask = PositionTargetTypemask::from_bits(
29411            tmp & PositionTargetTypemask::all().bits(),
29412        )
29413        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29414            flag_type: "PositionTargetTypemask",
29415            value: tmp as u32,
29416        })?;
29417        __struct.target_system = buf.get_u8();
29418        __struct.target_component = buf.get_u8();
29419        let tmp = buf.get_u8();
29420        __struct.coordinate_frame =
29421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29422                enum_type: "MavFrame",
29423                value: tmp as u32,
29424            })?;
29425        Ok(__struct)
29426    }
29427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29428        let mut __tmp = BytesMut::new(bytes);
29429        #[allow(clippy::absurd_extreme_comparisons)]
29430        #[allow(unused_comparisons)]
29431        if __tmp.remaining() < Self::ENCODED_LEN {
29432            panic!(
29433                "buffer is too small (need {} bytes, but got {})",
29434                Self::ENCODED_LEN,
29435                __tmp.remaining(),
29436            )
29437        }
29438        __tmp.put_u32_le(self.time_boot_ms);
29439        __tmp.put_i32_le(self.lat_int);
29440        __tmp.put_i32_le(self.lon_int);
29441        __tmp.put_f32_le(self.alt);
29442        __tmp.put_f32_le(self.vx);
29443        __tmp.put_f32_le(self.vy);
29444        __tmp.put_f32_le(self.vz);
29445        __tmp.put_f32_le(self.afx);
29446        __tmp.put_f32_le(self.afy);
29447        __tmp.put_f32_le(self.afz);
29448        __tmp.put_f32_le(self.yaw);
29449        __tmp.put_f32_le(self.yaw_rate);
29450        __tmp.put_u16_le(self.type_mask.bits());
29451        __tmp.put_u8(self.target_system);
29452        __tmp.put_u8(self.target_component);
29453        __tmp.put_u8(self.coordinate_frame as u8);
29454        if matches!(version, MavlinkVersion::V2) {
29455            let len = __tmp.len();
29456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29457        } else {
29458            __tmp.len()
29459        }
29460    }
29461}
29462#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29463#[doc = ""]
29464#[doc = "ID: 84"]
29465#[derive(Debug, Clone, PartialEq)]
29466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29468#[cfg_attr(feature = "ts", derive(TS))]
29469#[cfg_attr(feature = "ts", ts(export))]
29470pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29471    #[doc = "Timestamp (time since system boot)."]
29472    pub time_boot_ms: u32,
29473    #[doc = "X Position in NED frame"]
29474    pub x: f32,
29475    #[doc = "Y Position in NED frame"]
29476    pub y: f32,
29477    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29478    pub z: f32,
29479    #[doc = "X velocity in NED frame"]
29480    pub vx: f32,
29481    #[doc = "Y velocity in NED frame"]
29482    pub vy: f32,
29483    #[doc = "Z velocity in NED frame"]
29484    pub vz: f32,
29485    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29486    pub afx: f32,
29487    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29488    pub afy: f32,
29489    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29490    pub afz: f32,
29491    #[doc = "yaw setpoint"]
29492    pub yaw: f32,
29493    #[doc = "yaw rate setpoint"]
29494    pub yaw_rate: f32,
29495    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29496    pub type_mask: PositionTargetTypemask,
29497    #[doc = "System ID"]
29498    pub target_system: u8,
29499    #[doc = "Component ID"]
29500    pub target_component: u8,
29501    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29502    pub coordinate_frame: MavFrame,
29503}
29504impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29505    pub const ENCODED_LEN: usize = 53usize;
29506    pub const DEFAULT: Self = Self {
29507        time_boot_ms: 0_u32,
29508        x: 0.0_f32,
29509        y: 0.0_f32,
29510        z: 0.0_f32,
29511        vx: 0.0_f32,
29512        vy: 0.0_f32,
29513        vz: 0.0_f32,
29514        afx: 0.0_f32,
29515        afy: 0.0_f32,
29516        afz: 0.0_f32,
29517        yaw: 0.0_f32,
29518        yaw_rate: 0.0_f32,
29519        type_mask: PositionTargetTypemask::DEFAULT,
29520        target_system: 0_u8,
29521        target_component: 0_u8,
29522        coordinate_frame: MavFrame::DEFAULT,
29523    };
29524    #[cfg(feature = "arbitrary")]
29525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29526        use arbitrary::{Arbitrary, Unstructured};
29527        let mut buf = [0u8; 1024];
29528        rng.fill_bytes(&mut buf);
29529        let mut unstructured = Unstructured::new(&buf);
29530        Self::arbitrary(&mut unstructured).unwrap_or_default()
29531    }
29532}
29533impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29534    fn default() -> Self {
29535        Self::DEFAULT.clone()
29536    }
29537}
29538impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29539    type Message = MavMessage;
29540    const ID: u32 = 84u32;
29541    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29542    const EXTRA_CRC: u8 = 143u8;
29543    const ENCODED_LEN: usize = 53usize;
29544    fn deser(
29545        _version: MavlinkVersion,
29546        __input: &[u8],
29547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29548        let avail_len = __input.len();
29549        let mut payload_buf = [0; Self::ENCODED_LEN];
29550        let mut buf = if avail_len < Self::ENCODED_LEN {
29551            payload_buf[0..avail_len].copy_from_slice(__input);
29552            Bytes::new(&payload_buf)
29553        } else {
29554            Bytes::new(__input)
29555        };
29556        let mut __struct = Self::default();
29557        __struct.time_boot_ms = buf.get_u32_le();
29558        __struct.x = buf.get_f32_le();
29559        __struct.y = buf.get_f32_le();
29560        __struct.z = buf.get_f32_le();
29561        __struct.vx = buf.get_f32_le();
29562        __struct.vy = buf.get_f32_le();
29563        __struct.vz = buf.get_f32_le();
29564        __struct.afx = buf.get_f32_le();
29565        __struct.afy = buf.get_f32_le();
29566        __struct.afz = buf.get_f32_le();
29567        __struct.yaw = buf.get_f32_le();
29568        __struct.yaw_rate = buf.get_f32_le();
29569        let tmp = buf.get_u16_le();
29570        __struct.type_mask = PositionTargetTypemask::from_bits(
29571            tmp & PositionTargetTypemask::all().bits(),
29572        )
29573        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29574            flag_type: "PositionTargetTypemask",
29575            value: tmp as u32,
29576        })?;
29577        __struct.target_system = buf.get_u8();
29578        __struct.target_component = buf.get_u8();
29579        let tmp = buf.get_u8();
29580        __struct.coordinate_frame =
29581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29582                enum_type: "MavFrame",
29583                value: tmp as u32,
29584            })?;
29585        Ok(__struct)
29586    }
29587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29588        let mut __tmp = BytesMut::new(bytes);
29589        #[allow(clippy::absurd_extreme_comparisons)]
29590        #[allow(unused_comparisons)]
29591        if __tmp.remaining() < Self::ENCODED_LEN {
29592            panic!(
29593                "buffer is too small (need {} bytes, but got {})",
29594                Self::ENCODED_LEN,
29595                __tmp.remaining(),
29596            )
29597        }
29598        __tmp.put_u32_le(self.time_boot_ms);
29599        __tmp.put_f32_le(self.x);
29600        __tmp.put_f32_le(self.y);
29601        __tmp.put_f32_le(self.z);
29602        __tmp.put_f32_le(self.vx);
29603        __tmp.put_f32_le(self.vy);
29604        __tmp.put_f32_le(self.vz);
29605        __tmp.put_f32_le(self.afx);
29606        __tmp.put_f32_le(self.afy);
29607        __tmp.put_f32_le(self.afz);
29608        __tmp.put_f32_le(self.yaw);
29609        __tmp.put_f32_le(self.yaw_rate);
29610        __tmp.put_u16_le(self.type_mask.bits());
29611        __tmp.put_u8(self.target_system);
29612        __tmp.put_u8(self.target_component);
29613        __tmp.put_u8(self.coordinate_frame as u8);
29614        if matches!(version, MavlinkVersion::V2) {
29615            let len = __tmp.len();
29616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29617        } else {
29618            __tmp.len()
29619        }
29620    }
29621}
29622#[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
29623#[doc = ""]
29624#[doc = "ID: 354"]
29625#[derive(Debug, Clone, PartialEq)]
29626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29628#[cfg_attr(feature = "ts", derive(TS))]
29629#[cfg_attr(feature = "ts", ts(export))]
29630pub struct SET_VELOCITY_LIMITS_DATA {
29631    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29632    pub horizontal_speed_limit: f32,
29633    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29634    pub vertical_speed_limit: f32,
29635    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore)"]
29636    pub yaw_rate_limit: f32,
29637    #[doc = "System ID (0 for broadcast)."]
29638    pub target_system: u8,
29639    #[doc = "Component ID (0 for broadcast)."]
29640    pub target_component: u8,
29641}
29642impl SET_VELOCITY_LIMITS_DATA {
29643    pub const ENCODED_LEN: usize = 14usize;
29644    pub const DEFAULT: Self = Self {
29645        horizontal_speed_limit: 0.0_f32,
29646        vertical_speed_limit: 0.0_f32,
29647        yaw_rate_limit: 0.0_f32,
29648        target_system: 0_u8,
29649        target_component: 0_u8,
29650    };
29651    #[cfg(feature = "arbitrary")]
29652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29653        use arbitrary::{Arbitrary, Unstructured};
29654        let mut buf = [0u8; 1024];
29655        rng.fill_bytes(&mut buf);
29656        let mut unstructured = Unstructured::new(&buf);
29657        Self::arbitrary(&mut unstructured).unwrap_or_default()
29658    }
29659}
29660impl Default for SET_VELOCITY_LIMITS_DATA {
29661    fn default() -> Self {
29662        Self::DEFAULT.clone()
29663    }
29664}
29665impl MessageData for SET_VELOCITY_LIMITS_DATA {
29666    type Message = MavMessage;
29667    const ID: u32 = 354u32;
29668    const NAME: &'static str = "SET_VELOCITY_LIMITS";
29669    const EXTRA_CRC: u8 = 210u8;
29670    const ENCODED_LEN: usize = 14usize;
29671    fn deser(
29672        _version: MavlinkVersion,
29673        __input: &[u8],
29674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29675        let avail_len = __input.len();
29676        let mut payload_buf = [0; Self::ENCODED_LEN];
29677        let mut buf = if avail_len < Self::ENCODED_LEN {
29678            payload_buf[0..avail_len].copy_from_slice(__input);
29679            Bytes::new(&payload_buf)
29680        } else {
29681            Bytes::new(__input)
29682        };
29683        let mut __struct = Self::default();
29684        __struct.horizontal_speed_limit = buf.get_f32_le();
29685        __struct.vertical_speed_limit = buf.get_f32_le();
29686        __struct.yaw_rate_limit = buf.get_f32_le();
29687        __struct.target_system = buf.get_u8();
29688        __struct.target_component = buf.get_u8();
29689        Ok(__struct)
29690    }
29691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29692        let mut __tmp = BytesMut::new(bytes);
29693        #[allow(clippy::absurd_extreme_comparisons)]
29694        #[allow(unused_comparisons)]
29695        if __tmp.remaining() < Self::ENCODED_LEN {
29696            panic!(
29697                "buffer is too small (need {} bytes, but got {})",
29698                Self::ENCODED_LEN,
29699                __tmp.remaining(),
29700            )
29701        }
29702        __tmp.put_f32_le(self.horizontal_speed_limit);
29703        __tmp.put_f32_le(self.vertical_speed_limit);
29704        __tmp.put_f32_le(self.yaw_rate_limit);
29705        __tmp.put_u8(self.target_system);
29706        __tmp.put_u8(self.target_component);
29707        if matches!(version, MavlinkVersion::V2) {
29708            let len = __tmp.len();
29709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29710        } else {
29711            __tmp.len()
29712        }
29713    }
29714}
29715#[doc = "Status of simulation environment, if used."]
29716#[doc = ""]
29717#[doc = "ID: 108"]
29718#[derive(Debug, Clone, PartialEq)]
29719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29721#[cfg_attr(feature = "ts", derive(TS))]
29722#[cfg_attr(feature = "ts", ts(export))]
29723pub struct SIM_STATE_DATA {
29724    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29725    pub q1: f32,
29726    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29727    pub q2: f32,
29728    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29729    pub q3: f32,
29730    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29731    pub q4: f32,
29732    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29733    pub roll: f32,
29734    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29735    pub pitch: f32,
29736    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29737    pub yaw: f32,
29738    #[doc = "X acceleration"]
29739    pub xacc: f32,
29740    #[doc = "Y acceleration"]
29741    pub yacc: f32,
29742    #[doc = "Z acceleration"]
29743    pub zacc: f32,
29744    #[doc = "Angular speed around X axis"]
29745    pub xgyro: f32,
29746    #[doc = "Angular speed around Y axis"]
29747    pub ygyro: f32,
29748    #[doc = "Angular speed around Z axis"]
29749    pub zgyro: f32,
29750    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29751    pub lat: f32,
29752    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29753    pub lon: f32,
29754    #[doc = "Altitude"]
29755    pub alt: f32,
29756    #[doc = "Horizontal position standard deviation"]
29757    pub std_dev_horz: f32,
29758    #[doc = "Vertical position standard deviation"]
29759    pub std_dev_vert: f32,
29760    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29761    pub vn: f32,
29762    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29763    pub ve: f32,
29764    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29765    pub vd: f32,
29766    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29767    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29768    pub lat_int: i32,
29769    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29770    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29771    pub lon_int: i32,
29772}
29773impl SIM_STATE_DATA {
29774    pub const ENCODED_LEN: usize = 92usize;
29775    pub const DEFAULT: Self = Self {
29776        q1: 0.0_f32,
29777        q2: 0.0_f32,
29778        q3: 0.0_f32,
29779        q4: 0.0_f32,
29780        roll: 0.0_f32,
29781        pitch: 0.0_f32,
29782        yaw: 0.0_f32,
29783        xacc: 0.0_f32,
29784        yacc: 0.0_f32,
29785        zacc: 0.0_f32,
29786        xgyro: 0.0_f32,
29787        ygyro: 0.0_f32,
29788        zgyro: 0.0_f32,
29789        lat: 0.0_f32,
29790        lon: 0.0_f32,
29791        alt: 0.0_f32,
29792        std_dev_horz: 0.0_f32,
29793        std_dev_vert: 0.0_f32,
29794        vn: 0.0_f32,
29795        ve: 0.0_f32,
29796        vd: 0.0_f32,
29797        lat_int: 0_i32,
29798        lon_int: 0_i32,
29799    };
29800    #[cfg(feature = "arbitrary")]
29801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29802        use arbitrary::{Arbitrary, Unstructured};
29803        let mut buf = [0u8; 1024];
29804        rng.fill_bytes(&mut buf);
29805        let mut unstructured = Unstructured::new(&buf);
29806        Self::arbitrary(&mut unstructured).unwrap_or_default()
29807    }
29808}
29809impl Default for SIM_STATE_DATA {
29810    fn default() -> Self {
29811        Self::DEFAULT.clone()
29812    }
29813}
29814impl MessageData for SIM_STATE_DATA {
29815    type Message = MavMessage;
29816    const ID: u32 = 108u32;
29817    const NAME: &'static str = "SIM_STATE";
29818    const EXTRA_CRC: u8 = 32u8;
29819    const ENCODED_LEN: usize = 92usize;
29820    fn deser(
29821        _version: MavlinkVersion,
29822        __input: &[u8],
29823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29824        let avail_len = __input.len();
29825        let mut payload_buf = [0; Self::ENCODED_LEN];
29826        let mut buf = if avail_len < Self::ENCODED_LEN {
29827            payload_buf[0..avail_len].copy_from_slice(__input);
29828            Bytes::new(&payload_buf)
29829        } else {
29830            Bytes::new(__input)
29831        };
29832        let mut __struct = Self::default();
29833        __struct.q1 = buf.get_f32_le();
29834        __struct.q2 = buf.get_f32_le();
29835        __struct.q3 = buf.get_f32_le();
29836        __struct.q4 = buf.get_f32_le();
29837        __struct.roll = buf.get_f32_le();
29838        __struct.pitch = buf.get_f32_le();
29839        __struct.yaw = buf.get_f32_le();
29840        __struct.xacc = buf.get_f32_le();
29841        __struct.yacc = buf.get_f32_le();
29842        __struct.zacc = buf.get_f32_le();
29843        __struct.xgyro = buf.get_f32_le();
29844        __struct.ygyro = buf.get_f32_le();
29845        __struct.zgyro = buf.get_f32_le();
29846        __struct.lat = buf.get_f32_le();
29847        __struct.lon = buf.get_f32_le();
29848        __struct.alt = buf.get_f32_le();
29849        __struct.std_dev_horz = buf.get_f32_le();
29850        __struct.std_dev_vert = buf.get_f32_le();
29851        __struct.vn = buf.get_f32_le();
29852        __struct.ve = buf.get_f32_le();
29853        __struct.vd = buf.get_f32_le();
29854        __struct.lat_int = buf.get_i32_le();
29855        __struct.lon_int = buf.get_i32_le();
29856        Ok(__struct)
29857    }
29858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29859        let mut __tmp = BytesMut::new(bytes);
29860        #[allow(clippy::absurd_extreme_comparisons)]
29861        #[allow(unused_comparisons)]
29862        if __tmp.remaining() < Self::ENCODED_LEN {
29863            panic!(
29864                "buffer is too small (need {} bytes, but got {})",
29865                Self::ENCODED_LEN,
29866                __tmp.remaining(),
29867            )
29868        }
29869        __tmp.put_f32_le(self.q1);
29870        __tmp.put_f32_le(self.q2);
29871        __tmp.put_f32_le(self.q3);
29872        __tmp.put_f32_le(self.q4);
29873        __tmp.put_f32_le(self.roll);
29874        __tmp.put_f32_le(self.pitch);
29875        __tmp.put_f32_le(self.yaw);
29876        __tmp.put_f32_le(self.xacc);
29877        __tmp.put_f32_le(self.yacc);
29878        __tmp.put_f32_le(self.zacc);
29879        __tmp.put_f32_le(self.xgyro);
29880        __tmp.put_f32_le(self.ygyro);
29881        __tmp.put_f32_le(self.zgyro);
29882        __tmp.put_f32_le(self.lat);
29883        __tmp.put_f32_le(self.lon);
29884        __tmp.put_f32_le(self.alt);
29885        __tmp.put_f32_le(self.std_dev_horz);
29886        __tmp.put_f32_le(self.std_dev_vert);
29887        __tmp.put_f32_le(self.vn);
29888        __tmp.put_f32_le(self.ve);
29889        __tmp.put_f32_le(self.vd);
29890        if matches!(version, MavlinkVersion::V2) {
29891            __tmp.put_i32_le(self.lat_int);
29892            __tmp.put_i32_le(self.lon_int);
29893            let len = __tmp.len();
29894            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29895        } else {
29896            __tmp.len()
29897        }
29898    }
29899}
29900#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29901#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29902#[doc = ""]
29903#[doc = "ID: 370"]
29904#[derive(Debug, Clone, PartialEq)]
29905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29907#[cfg_attr(feature = "ts", derive(TS))]
29908#[cfg_attr(feature = "ts", ts(export))]
29909pub struct SMART_BATTERY_INFO_DATA {
29910    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29911    pub capacity_full_specification: i32,
29912    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29913    pub capacity_full: i32,
29914    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29915    pub cycle_count: u16,
29916    #[doc = "Battery weight. 0: field not provided."]
29917    pub weight: u16,
29918    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29919    pub discharge_minimum_voltage: u16,
29920    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29921    pub charging_minimum_voltage: u16,
29922    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29923    pub resting_minimum_voltage: u16,
29924    #[doc = "Battery ID"]
29925    pub id: u8,
29926    #[doc = "Function of the battery"]
29927    pub battery_function: MavBatteryFunction,
29928    #[doc = "Type (chemistry) of the battery"]
29929    pub mavtype: MavBatteryType,
29930    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29931    #[cfg_attr(
29932        feature = "serde",
29933        serde(
29934            serialize_with = "crate::nulstr::serialize::<_, 16>",
29935            deserialize_with = "crate::nulstr::deserialize::<_, 16>"
29936        )
29937    )]
29938    #[cfg_attr(feature = "ts", ts(type = "string"))]
29939    pub serial_number: [u8; 16],
29940    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29941    #[cfg_attr(
29942        feature = "serde",
29943        serde(
29944            serialize_with = "crate::nulstr::serialize::<_, 50>",
29945            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
29946        )
29947    )]
29948    #[cfg_attr(feature = "ts", ts(type = "string"))]
29949    pub device_name: [u8; 50],
29950    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29952    pub charging_maximum_voltage: u16,
29953    #[doc = "Number of battery cells in series. 0: field not provided."]
29954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29955    pub cells_in_series: u8,
29956    #[doc = "Maximum pack discharge current. 0: field not provided."]
29957    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29958    pub discharge_maximum_current: u32,
29959    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29961    pub discharge_maximum_burst_current: u32,
29962    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29964    #[cfg_attr(
29965        feature = "serde",
29966        serde(
29967            serialize_with = "crate::nulstr::serialize::<_, 11>",
29968            deserialize_with = "crate::nulstr::deserialize::<_, 11>"
29969        )
29970    )]
29971    #[cfg_attr(feature = "ts", ts(type = "string"))]
29972    pub manufacture_date: [u8; 11],
29973}
29974impl SMART_BATTERY_INFO_DATA {
29975    pub const ENCODED_LEN: usize = 109usize;
29976    pub const DEFAULT: Self = Self {
29977        capacity_full_specification: 0_i32,
29978        capacity_full: 0_i32,
29979        cycle_count: 0_u16,
29980        weight: 0_u16,
29981        discharge_minimum_voltage: 0_u16,
29982        charging_minimum_voltage: 0_u16,
29983        resting_minimum_voltage: 0_u16,
29984        id: 0_u8,
29985        battery_function: MavBatteryFunction::DEFAULT,
29986        mavtype: MavBatteryType::DEFAULT,
29987        serial_number: [0_u8; 16usize],
29988        device_name: [0_u8; 50usize],
29989        charging_maximum_voltage: 0_u16,
29990        cells_in_series: 0_u8,
29991        discharge_maximum_current: 0_u32,
29992        discharge_maximum_burst_current: 0_u32,
29993        manufacture_date: [0_u8; 11usize],
29994    };
29995    #[cfg(feature = "arbitrary")]
29996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29997        use arbitrary::{Arbitrary, Unstructured};
29998        let mut buf = [0u8; 1024];
29999        rng.fill_bytes(&mut buf);
30000        let mut unstructured = Unstructured::new(&buf);
30001        Self::arbitrary(&mut unstructured).unwrap_or_default()
30002    }
30003}
30004impl Default for SMART_BATTERY_INFO_DATA {
30005    fn default() -> Self {
30006        Self::DEFAULT.clone()
30007    }
30008}
30009impl MessageData for SMART_BATTERY_INFO_DATA {
30010    type Message = MavMessage;
30011    const ID: u32 = 370u32;
30012    const NAME: &'static str = "SMART_BATTERY_INFO";
30013    const EXTRA_CRC: u8 = 75u8;
30014    const ENCODED_LEN: usize = 109usize;
30015    fn deser(
30016        _version: MavlinkVersion,
30017        __input: &[u8],
30018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30019        let avail_len = __input.len();
30020        let mut payload_buf = [0; Self::ENCODED_LEN];
30021        let mut buf = if avail_len < Self::ENCODED_LEN {
30022            payload_buf[0..avail_len].copy_from_slice(__input);
30023            Bytes::new(&payload_buf)
30024        } else {
30025            Bytes::new(__input)
30026        };
30027        let mut __struct = Self::default();
30028        __struct.capacity_full_specification = buf.get_i32_le();
30029        __struct.capacity_full = buf.get_i32_le();
30030        __struct.cycle_count = buf.get_u16_le();
30031        __struct.weight = buf.get_u16_le();
30032        __struct.discharge_minimum_voltage = buf.get_u16_le();
30033        __struct.charging_minimum_voltage = buf.get_u16_le();
30034        __struct.resting_minimum_voltage = buf.get_u16_le();
30035        __struct.id = buf.get_u8();
30036        let tmp = buf.get_u8();
30037        __struct.battery_function =
30038            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30039                enum_type: "MavBatteryFunction",
30040                value: tmp as u32,
30041            })?;
30042        let tmp = buf.get_u8();
30043        __struct.mavtype =
30044            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30045                enum_type: "MavBatteryType",
30046                value: tmp as u32,
30047            })?;
30048        for v in &mut __struct.serial_number {
30049            let val = buf.get_u8();
30050            *v = val;
30051        }
30052        for v in &mut __struct.device_name {
30053            let val = buf.get_u8();
30054            *v = val;
30055        }
30056        __struct.charging_maximum_voltage = buf.get_u16_le();
30057        __struct.cells_in_series = buf.get_u8();
30058        __struct.discharge_maximum_current = buf.get_u32_le();
30059        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30060        for v in &mut __struct.manufacture_date {
30061            let val = buf.get_u8();
30062            *v = val;
30063        }
30064        Ok(__struct)
30065    }
30066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30067        let mut __tmp = BytesMut::new(bytes);
30068        #[allow(clippy::absurd_extreme_comparisons)]
30069        #[allow(unused_comparisons)]
30070        if __tmp.remaining() < Self::ENCODED_LEN {
30071            panic!(
30072                "buffer is too small (need {} bytes, but got {})",
30073                Self::ENCODED_LEN,
30074                __tmp.remaining(),
30075            )
30076        }
30077        __tmp.put_i32_le(self.capacity_full_specification);
30078        __tmp.put_i32_le(self.capacity_full);
30079        __tmp.put_u16_le(self.cycle_count);
30080        __tmp.put_u16_le(self.weight);
30081        __tmp.put_u16_le(self.discharge_minimum_voltage);
30082        __tmp.put_u16_le(self.charging_minimum_voltage);
30083        __tmp.put_u16_le(self.resting_minimum_voltage);
30084        __tmp.put_u8(self.id);
30085        __tmp.put_u8(self.battery_function as u8);
30086        __tmp.put_u8(self.mavtype as u8);
30087        for val in &self.serial_number {
30088            __tmp.put_u8(*val);
30089        }
30090        for val in &self.device_name {
30091            __tmp.put_u8(*val);
30092        }
30093        if matches!(version, MavlinkVersion::V2) {
30094            __tmp.put_u16_le(self.charging_maximum_voltage);
30095            __tmp.put_u8(self.cells_in_series);
30096            __tmp.put_u32_le(self.discharge_maximum_current);
30097            __tmp.put_u32_le(self.discharge_maximum_burst_current);
30098            for val in &self.manufacture_date {
30099                __tmp.put_u8(*val);
30100            }
30101            let len = __tmp.len();
30102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30103        } else {
30104            __tmp.len()
30105        }
30106    }
30107}
30108#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30109#[doc = ""]
30110#[doc = "ID: 253"]
30111#[derive(Debug, Clone, PartialEq)]
30112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30114#[cfg_attr(feature = "ts", derive(TS))]
30115#[cfg_attr(feature = "ts", ts(export))]
30116pub struct STATUSTEXT_DATA {
30117    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30118    pub severity: MavSeverity,
30119    #[doc = "Status text message, without null termination character"]
30120    #[cfg_attr(
30121        feature = "serde",
30122        serde(
30123            serialize_with = "crate::nulstr::serialize::<_, 50>",
30124            deserialize_with = "crate::nulstr::deserialize::<_, 50>"
30125        )
30126    )]
30127    #[cfg_attr(feature = "ts", ts(type = "string"))]
30128    pub text: [u8; 50],
30129    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30131    pub id: u16,
30132    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30133    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30134    pub chunk_seq: u8,
30135}
30136impl STATUSTEXT_DATA {
30137    pub const ENCODED_LEN: usize = 54usize;
30138    pub const DEFAULT: Self = Self {
30139        severity: MavSeverity::DEFAULT,
30140        text: [0_u8; 50usize],
30141        id: 0_u16,
30142        chunk_seq: 0_u8,
30143    };
30144    #[cfg(feature = "arbitrary")]
30145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30146        use arbitrary::{Arbitrary, Unstructured};
30147        let mut buf = [0u8; 1024];
30148        rng.fill_bytes(&mut buf);
30149        let mut unstructured = Unstructured::new(&buf);
30150        Self::arbitrary(&mut unstructured).unwrap_or_default()
30151    }
30152}
30153impl Default for STATUSTEXT_DATA {
30154    fn default() -> Self {
30155        Self::DEFAULT.clone()
30156    }
30157}
30158impl MessageData for STATUSTEXT_DATA {
30159    type Message = MavMessage;
30160    const ID: u32 = 253u32;
30161    const NAME: &'static str = "STATUSTEXT";
30162    const EXTRA_CRC: u8 = 83u8;
30163    const ENCODED_LEN: usize = 54usize;
30164    fn deser(
30165        _version: MavlinkVersion,
30166        __input: &[u8],
30167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30168        let avail_len = __input.len();
30169        let mut payload_buf = [0; Self::ENCODED_LEN];
30170        let mut buf = if avail_len < Self::ENCODED_LEN {
30171            payload_buf[0..avail_len].copy_from_slice(__input);
30172            Bytes::new(&payload_buf)
30173        } else {
30174            Bytes::new(__input)
30175        };
30176        let mut __struct = Self::default();
30177        let tmp = buf.get_u8();
30178        __struct.severity =
30179            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30180                enum_type: "MavSeverity",
30181                value: tmp as u32,
30182            })?;
30183        for v in &mut __struct.text {
30184            let val = buf.get_u8();
30185            *v = val;
30186        }
30187        __struct.id = buf.get_u16_le();
30188        __struct.chunk_seq = buf.get_u8();
30189        Ok(__struct)
30190    }
30191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30192        let mut __tmp = BytesMut::new(bytes);
30193        #[allow(clippy::absurd_extreme_comparisons)]
30194        #[allow(unused_comparisons)]
30195        if __tmp.remaining() < Self::ENCODED_LEN {
30196            panic!(
30197                "buffer is too small (need {} bytes, but got {})",
30198                Self::ENCODED_LEN,
30199                __tmp.remaining(),
30200            )
30201        }
30202        __tmp.put_u8(self.severity as u8);
30203        for val in &self.text {
30204            __tmp.put_u8(*val);
30205        }
30206        if matches!(version, MavlinkVersion::V2) {
30207            __tmp.put_u16_le(self.id);
30208            __tmp.put_u8(self.chunk_seq);
30209            let len = __tmp.len();
30210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30211        } else {
30212            __tmp.len()
30213        }
30214    }
30215}
30216#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30217#[doc = ""]
30218#[doc = "ID: 261"]
30219#[derive(Debug, Clone, PartialEq)]
30220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30222#[cfg_attr(feature = "ts", derive(TS))]
30223#[cfg_attr(feature = "ts", ts(export))]
30224pub struct STORAGE_INFORMATION_DATA {
30225    #[doc = "Timestamp (time since system boot)."]
30226    pub time_boot_ms: u32,
30227    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30228    pub total_capacity: f32,
30229    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30230    pub used_capacity: f32,
30231    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30232    pub available_capacity: f32,
30233    #[doc = "Read speed."]
30234    pub read_speed: f32,
30235    #[doc = "Write speed."]
30236    pub write_speed: f32,
30237    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30238    pub storage_id: u8,
30239    #[doc = "Number of storage devices"]
30240    pub storage_count: u8,
30241    #[doc = "Status of storage"]
30242    pub status: StorageStatus,
30243    #[doc = "Type of storage"]
30244    #[cfg_attr(feature = "serde", serde(default))]
30245    pub mavtype: StorageType,
30246    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30248    #[cfg_attr(
30249        feature = "serde",
30250        serde(
30251            serialize_with = "crate::nulstr::serialize::<_, 32>",
30252            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
30253        )
30254    )]
30255    #[cfg_attr(feature = "ts", ts(type = "string"))]
30256    pub name: [u8; 32],
30257    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30258    #[cfg_attr(feature = "serde", serde(default))]
30259    pub storage_usage: StorageUsageFlag,
30260}
30261impl STORAGE_INFORMATION_DATA {
30262    pub const ENCODED_LEN: usize = 61usize;
30263    pub const DEFAULT: Self = Self {
30264        time_boot_ms: 0_u32,
30265        total_capacity: 0.0_f32,
30266        used_capacity: 0.0_f32,
30267        available_capacity: 0.0_f32,
30268        read_speed: 0.0_f32,
30269        write_speed: 0.0_f32,
30270        storage_id: 0_u8,
30271        storage_count: 0_u8,
30272        status: StorageStatus::DEFAULT,
30273        mavtype: StorageType::DEFAULT,
30274        name: [0_u8; 32usize],
30275        storage_usage: StorageUsageFlag::DEFAULT,
30276    };
30277    #[cfg(feature = "arbitrary")]
30278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30279        use arbitrary::{Arbitrary, Unstructured};
30280        let mut buf = [0u8; 1024];
30281        rng.fill_bytes(&mut buf);
30282        let mut unstructured = Unstructured::new(&buf);
30283        Self::arbitrary(&mut unstructured).unwrap_or_default()
30284    }
30285}
30286impl Default for STORAGE_INFORMATION_DATA {
30287    fn default() -> Self {
30288        Self::DEFAULT.clone()
30289    }
30290}
30291impl MessageData for STORAGE_INFORMATION_DATA {
30292    type Message = MavMessage;
30293    const ID: u32 = 261u32;
30294    const NAME: &'static str = "STORAGE_INFORMATION";
30295    const EXTRA_CRC: u8 = 179u8;
30296    const ENCODED_LEN: usize = 61usize;
30297    fn deser(
30298        _version: MavlinkVersion,
30299        __input: &[u8],
30300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30301        let avail_len = __input.len();
30302        let mut payload_buf = [0; Self::ENCODED_LEN];
30303        let mut buf = if avail_len < Self::ENCODED_LEN {
30304            payload_buf[0..avail_len].copy_from_slice(__input);
30305            Bytes::new(&payload_buf)
30306        } else {
30307            Bytes::new(__input)
30308        };
30309        let mut __struct = Self::default();
30310        __struct.time_boot_ms = buf.get_u32_le();
30311        __struct.total_capacity = buf.get_f32_le();
30312        __struct.used_capacity = buf.get_f32_le();
30313        __struct.available_capacity = buf.get_f32_le();
30314        __struct.read_speed = buf.get_f32_le();
30315        __struct.write_speed = buf.get_f32_le();
30316        __struct.storage_id = buf.get_u8();
30317        __struct.storage_count = buf.get_u8();
30318        let tmp = buf.get_u8();
30319        __struct.status =
30320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30321                enum_type: "StorageStatus",
30322                value: tmp as u32,
30323            })?;
30324        let tmp = buf.get_u8();
30325        __struct.mavtype =
30326            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30327                enum_type: "StorageType",
30328                value: tmp as u32,
30329            })?;
30330        for v in &mut __struct.name {
30331            let val = buf.get_u8();
30332            *v = val;
30333        }
30334        let tmp = buf.get_u8();
30335        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
30336            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30337                flag_type: "StorageUsageFlag",
30338                value: tmp as u32,
30339            })?;
30340        Ok(__struct)
30341    }
30342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30343        let mut __tmp = BytesMut::new(bytes);
30344        #[allow(clippy::absurd_extreme_comparisons)]
30345        #[allow(unused_comparisons)]
30346        if __tmp.remaining() < Self::ENCODED_LEN {
30347            panic!(
30348                "buffer is too small (need {} bytes, but got {})",
30349                Self::ENCODED_LEN,
30350                __tmp.remaining(),
30351            )
30352        }
30353        __tmp.put_u32_le(self.time_boot_ms);
30354        __tmp.put_f32_le(self.total_capacity);
30355        __tmp.put_f32_le(self.used_capacity);
30356        __tmp.put_f32_le(self.available_capacity);
30357        __tmp.put_f32_le(self.read_speed);
30358        __tmp.put_f32_le(self.write_speed);
30359        __tmp.put_u8(self.storage_id);
30360        __tmp.put_u8(self.storage_count);
30361        __tmp.put_u8(self.status as u8);
30362        if matches!(version, MavlinkVersion::V2) {
30363            __tmp.put_u8(self.mavtype as u8);
30364            for val in &self.name {
30365                __tmp.put_u8(*val);
30366            }
30367            __tmp.put_u8(self.storage_usage.bits());
30368            let len = __tmp.len();
30369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30370        } else {
30371            __tmp.len()
30372        }
30373    }
30374}
30375#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30376#[doc = ""]
30377#[doc = "ID: 401"]
30378#[derive(Debug, Clone, PartialEq)]
30379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30381#[cfg_attr(feature = "ts", derive(TS))]
30382#[cfg_attr(feature = "ts", ts(export))]
30383pub struct SUPPORTED_TUNES_DATA {
30384    #[doc = "Bitfield of supported tune formats."]
30385    pub format: TuneFormat,
30386    #[doc = "System ID"]
30387    pub target_system: u8,
30388    #[doc = "Component ID"]
30389    pub target_component: u8,
30390}
30391impl SUPPORTED_TUNES_DATA {
30392    pub const ENCODED_LEN: usize = 6usize;
30393    pub const DEFAULT: Self = Self {
30394        format: TuneFormat::DEFAULT,
30395        target_system: 0_u8,
30396        target_component: 0_u8,
30397    };
30398    #[cfg(feature = "arbitrary")]
30399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30400        use arbitrary::{Arbitrary, Unstructured};
30401        let mut buf = [0u8; 1024];
30402        rng.fill_bytes(&mut buf);
30403        let mut unstructured = Unstructured::new(&buf);
30404        Self::arbitrary(&mut unstructured).unwrap_or_default()
30405    }
30406}
30407impl Default for SUPPORTED_TUNES_DATA {
30408    fn default() -> Self {
30409        Self::DEFAULT.clone()
30410    }
30411}
30412impl MessageData for SUPPORTED_TUNES_DATA {
30413    type Message = MavMessage;
30414    const ID: u32 = 401u32;
30415    const NAME: &'static str = "SUPPORTED_TUNES";
30416    const EXTRA_CRC: u8 = 183u8;
30417    const ENCODED_LEN: usize = 6usize;
30418    fn deser(
30419        _version: MavlinkVersion,
30420        __input: &[u8],
30421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30422        let avail_len = __input.len();
30423        let mut payload_buf = [0; Self::ENCODED_LEN];
30424        let mut buf = if avail_len < Self::ENCODED_LEN {
30425            payload_buf[0..avail_len].copy_from_slice(__input);
30426            Bytes::new(&payload_buf)
30427        } else {
30428            Bytes::new(__input)
30429        };
30430        let mut __struct = Self::default();
30431        let tmp = buf.get_u32_le();
30432        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30433            ::mavlink_core::error::ParserError::InvalidEnum {
30434                enum_type: "TuneFormat",
30435                value: tmp as u32,
30436            },
30437        )?;
30438        __struct.target_system = buf.get_u8();
30439        __struct.target_component = buf.get_u8();
30440        Ok(__struct)
30441    }
30442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30443        let mut __tmp = BytesMut::new(bytes);
30444        #[allow(clippy::absurd_extreme_comparisons)]
30445        #[allow(unused_comparisons)]
30446        if __tmp.remaining() < Self::ENCODED_LEN {
30447            panic!(
30448                "buffer is too small (need {} bytes, but got {})",
30449                Self::ENCODED_LEN,
30450                __tmp.remaining(),
30451            )
30452        }
30453        __tmp.put_u32_le(self.format as u32);
30454        __tmp.put_u8(self.target_system);
30455        __tmp.put_u8(self.target_component);
30456        if matches!(version, MavlinkVersion::V2) {
30457            let len = __tmp.len();
30458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30459        } else {
30460            __tmp.len()
30461        }
30462    }
30463}
30464#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30465#[doc = ""]
30466#[doc = "ID: 2"]
30467#[derive(Debug, Clone, PartialEq)]
30468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30470#[cfg_attr(feature = "ts", derive(TS))]
30471#[cfg_attr(feature = "ts", ts(export))]
30472pub struct SYSTEM_TIME_DATA {
30473    #[doc = "Timestamp (UNIX epoch time)."]
30474    pub time_unix_usec: u64,
30475    #[doc = "Timestamp (time since system boot)."]
30476    pub time_boot_ms: u32,
30477}
30478impl SYSTEM_TIME_DATA {
30479    pub const ENCODED_LEN: usize = 12usize;
30480    pub const DEFAULT: Self = Self {
30481        time_unix_usec: 0_u64,
30482        time_boot_ms: 0_u32,
30483    };
30484    #[cfg(feature = "arbitrary")]
30485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30486        use arbitrary::{Arbitrary, Unstructured};
30487        let mut buf = [0u8; 1024];
30488        rng.fill_bytes(&mut buf);
30489        let mut unstructured = Unstructured::new(&buf);
30490        Self::arbitrary(&mut unstructured).unwrap_or_default()
30491    }
30492}
30493impl Default for SYSTEM_TIME_DATA {
30494    fn default() -> Self {
30495        Self::DEFAULT.clone()
30496    }
30497}
30498impl MessageData for SYSTEM_TIME_DATA {
30499    type Message = MavMessage;
30500    const ID: u32 = 2u32;
30501    const NAME: &'static str = "SYSTEM_TIME";
30502    const EXTRA_CRC: u8 = 137u8;
30503    const ENCODED_LEN: usize = 12usize;
30504    fn deser(
30505        _version: MavlinkVersion,
30506        __input: &[u8],
30507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30508        let avail_len = __input.len();
30509        let mut payload_buf = [0; Self::ENCODED_LEN];
30510        let mut buf = if avail_len < Self::ENCODED_LEN {
30511            payload_buf[0..avail_len].copy_from_slice(__input);
30512            Bytes::new(&payload_buf)
30513        } else {
30514            Bytes::new(__input)
30515        };
30516        let mut __struct = Self::default();
30517        __struct.time_unix_usec = buf.get_u64_le();
30518        __struct.time_boot_ms = buf.get_u32_le();
30519        Ok(__struct)
30520    }
30521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30522        let mut __tmp = BytesMut::new(bytes);
30523        #[allow(clippy::absurd_extreme_comparisons)]
30524        #[allow(unused_comparisons)]
30525        if __tmp.remaining() < Self::ENCODED_LEN {
30526            panic!(
30527                "buffer is too small (need {} bytes, but got {})",
30528                Self::ENCODED_LEN,
30529                __tmp.remaining(),
30530            )
30531        }
30532        __tmp.put_u64_le(self.time_unix_usec);
30533        __tmp.put_u32_le(self.time_boot_ms);
30534        if matches!(version, MavlinkVersion::V2) {
30535            let len = __tmp.len();
30536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30537        } else {
30538            __tmp.len()
30539        }
30540    }
30541}
30542#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30543#[doc = ""]
30544#[doc = "ID: 1"]
30545#[derive(Debug, Clone, PartialEq)]
30546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30548#[cfg_attr(feature = "ts", derive(TS))]
30549#[cfg_attr(feature = "ts", ts(export))]
30550pub struct SYS_STATUS_DATA {
30551    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30552    pub onboard_control_sensors_present: MavSysStatusSensor,
30553    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30554    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30555    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30556    pub onboard_control_sensors_health: MavSysStatusSensor,
30557    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30558    pub load: u16,
30559    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30560    pub voltage_battery: u16,
30561    #[doc = "Battery current, -1: Current not sent by autopilot"]
30562    pub current_battery: i16,
30563    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30564    pub drop_rate_comm: u16,
30565    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30566    pub errors_comm: u16,
30567    #[doc = "Autopilot-specific errors"]
30568    pub errors_count1: u16,
30569    #[doc = "Autopilot-specific errors"]
30570    pub errors_count2: u16,
30571    #[doc = "Autopilot-specific errors"]
30572    pub errors_count3: u16,
30573    #[doc = "Autopilot-specific errors"]
30574    pub errors_count4: u16,
30575    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30576    pub battery_remaining: i8,
30577    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30578    #[cfg_attr(feature = "serde", serde(default))]
30579    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30580    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30581    #[cfg_attr(feature = "serde", serde(default))]
30582    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30583    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30584    #[cfg_attr(feature = "serde", serde(default))]
30585    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30586}
30587impl SYS_STATUS_DATA {
30588    pub const ENCODED_LEN: usize = 43usize;
30589    pub const DEFAULT: Self = Self {
30590        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30591        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30592        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30593        load: 0_u16,
30594        voltage_battery: 0_u16,
30595        current_battery: 0_i16,
30596        drop_rate_comm: 0_u16,
30597        errors_comm: 0_u16,
30598        errors_count1: 0_u16,
30599        errors_count2: 0_u16,
30600        errors_count3: 0_u16,
30601        errors_count4: 0_u16,
30602        battery_remaining: 0_i8,
30603        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30604        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30605        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30606    };
30607    #[cfg(feature = "arbitrary")]
30608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30609        use arbitrary::{Arbitrary, Unstructured};
30610        let mut buf = [0u8; 1024];
30611        rng.fill_bytes(&mut buf);
30612        let mut unstructured = Unstructured::new(&buf);
30613        Self::arbitrary(&mut unstructured).unwrap_or_default()
30614    }
30615}
30616impl Default for SYS_STATUS_DATA {
30617    fn default() -> Self {
30618        Self::DEFAULT.clone()
30619    }
30620}
30621impl MessageData for SYS_STATUS_DATA {
30622    type Message = MavMessage;
30623    const ID: u32 = 1u32;
30624    const NAME: &'static str = "SYS_STATUS";
30625    const EXTRA_CRC: u8 = 124u8;
30626    const ENCODED_LEN: usize = 43usize;
30627    fn deser(
30628        _version: MavlinkVersion,
30629        __input: &[u8],
30630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30631        let avail_len = __input.len();
30632        let mut payload_buf = [0; Self::ENCODED_LEN];
30633        let mut buf = if avail_len < Self::ENCODED_LEN {
30634            payload_buf[0..avail_len].copy_from_slice(__input);
30635            Bytes::new(&payload_buf)
30636        } else {
30637            Bytes::new(__input)
30638        };
30639        let mut __struct = Self::default();
30640        let tmp = buf.get_u32_le();
30641        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
30642            tmp & MavSysStatusSensor::all().bits(),
30643        )
30644        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30645            flag_type: "MavSysStatusSensor",
30646            value: tmp as u32,
30647        })?;
30648        let tmp = buf.get_u32_le();
30649        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
30650            tmp & MavSysStatusSensor::all().bits(),
30651        )
30652        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30653            flag_type: "MavSysStatusSensor",
30654            value: tmp as u32,
30655        })?;
30656        let tmp = buf.get_u32_le();
30657        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
30658            tmp & MavSysStatusSensor::all().bits(),
30659        )
30660        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30661            flag_type: "MavSysStatusSensor",
30662            value: tmp as u32,
30663        })?;
30664        __struct.load = buf.get_u16_le();
30665        __struct.voltage_battery = buf.get_u16_le();
30666        __struct.current_battery = buf.get_i16_le();
30667        __struct.drop_rate_comm = buf.get_u16_le();
30668        __struct.errors_comm = buf.get_u16_le();
30669        __struct.errors_count1 = buf.get_u16_le();
30670        __struct.errors_count2 = buf.get_u16_le();
30671        __struct.errors_count3 = buf.get_u16_le();
30672        __struct.errors_count4 = buf.get_u16_le();
30673        __struct.battery_remaining = buf.get_i8();
30674        let tmp = buf.get_u32_le();
30675        __struct.onboard_control_sensors_present_extended =
30676            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30677                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30678                flag_type: "MavSysStatusSensorExtended",
30679                value: tmp as u32,
30680            })?;
30681        let tmp = buf.get_u32_le();
30682        __struct.onboard_control_sensors_enabled_extended =
30683            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30684                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30685                flag_type: "MavSysStatusSensorExtended",
30686                value: tmp as u32,
30687            })?;
30688        let tmp = buf.get_u32_le();
30689        __struct.onboard_control_sensors_health_extended =
30690            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
30691                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30692                flag_type: "MavSysStatusSensorExtended",
30693                value: tmp as u32,
30694            })?;
30695        Ok(__struct)
30696    }
30697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30698        let mut __tmp = BytesMut::new(bytes);
30699        #[allow(clippy::absurd_extreme_comparisons)]
30700        #[allow(unused_comparisons)]
30701        if __tmp.remaining() < Self::ENCODED_LEN {
30702            panic!(
30703                "buffer is too small (need {} bytes, but got {})",
30704                Self::ENCODED_LEN,
30705                __tmp.remaining(),
30706            )
30707        }
30708        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30709        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30710        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30711        __tmp.put_u16_le(self.load);
30712        __tmp.put_u16_le(self.voltage_battery);
30713        __tmp.put_i16_le(self.current_battery);
30714        __tmp.put_u16_le(self.drop_rate_comm);
30715        __tmp.put_u16_le(self.errors_comm);
30716        __tmp.put_u16_le(self.errors_count1);
30717        __tmp.put_u16_le(self.errors_count2);
30718        __tmp.put_u16_le(self.errors_count3);
30719        __tmp.put_u16_le(self.errors_count4);
30720        __tmp.put_i8(self.battery_remaining);
30721        if matches!(version, MavlinkVersion::V2) {
30722            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30723            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30724            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30725            let len = __tmp.len();
30726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30727        } else {
30728            __tmp.len()
30729        }
30730    }
30731}
30732#[doc = "Current motion information from sensors on a target."]
30733#[doc = ""]
30734#[doc = "ID: 510"]
30735#[derive(Debug, Clone, PartialEq)]
30736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30738#[cfg_attr(feature = "ts", derive(TS))]
30739#[cfg_attr(feature = "ts", ts(export))]
30740pub struct TARGET_ABSOLUTE_DATA {
30741    #[doc = "Timestamp (UNIX epoch time)."]
30742    pub timestamp: u64,
30743    #[doc = "Target's latitude (WGS84)"]
30744    pub lat: i32,
30745    #[doc = "Target's longitude (WGS84)"]
30746    pub lon: i32,
30747    #[doc = "Target's altitude (AMSL)"]
30748    pub alt: f32,
30749    #[doc = "Target's velocity in its body frame"]
30750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30751    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30752    pub vel: [f32; 3],
30753    #[doc = "Linear target's acceleration in its body frame"]
30754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30755    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30756    pub acc: [f32; 3],
30757    #[doc = "Quaternion of the target's orientation from its body frame to the vehicle's NED frame."]
30758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30760    pub q_target: [f32; 4],
30761    #[doc = "Target's roll, pitch and yaw rates"]
30762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30764    pub rates: [f32; 3],
30765    #[doc = "Standard deviation of horizontal (eph) and vertical (epv) position errors"]
30766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30768    pub position_std: [f32; 2],
30769    #[doc = "Standard deviation of the target's velocity in its body frame"]
30770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30772    pub vel_std: [f32; 3],
30773    #[doc = "Standard deviation of the target's acceleration in its body frame"]
30774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30776    pub acc_std: [f32; 3],
30777    #[doc = "The ID of the target if multiple targets are present"]
30778    pub id: u8,
30779    #[doc = "Bitmap to indicate the sensor's reporting capabilities"]
30780    pub sensor_capabilities: TargetAbsoluteSensorCapabilityFlags,
30781}
30782impl TARGET_ABSOLUTE_DATA {
30783    pub const ENCODED_LEN: usize = 106usize;
30784    pub const DEFAULT: Self = Self {
30785        timestamp: 0_u64,
30786        lat: 0_i32,
30787        lon: 0_i32,
30788        alt: 0.0_f32,
30789        vel: [0.0_f32; 3usize],
30790        acc: [0.0_f32; 3usize],
30791        q_target: [0.0_f32; 4usize],
30792        rates: [0.0_f32; 3usize],
30793        position_std: [0.0_f32; 2usize],
30794        vel_std: [0.0_f32; 3usize],
30795        acc_std: [0.0_f32; 3usize],
30796        id: 0_u8,
30797        sensor_capabilities: TargetAbsoluteSensorCapabilityFlags::DEFAULT,
30798    };
30799    #[cfg(feature = "arbitrary")]
30800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30801        use arbitrary::{Arbitrary, Unstructured};
30802        let mut buf = [0u8; 1024];
30803        rng.fill_bytes(&mut buf);
30804        let mut unstructured = Unstructured::new(&buf);
30805        Self::arbitrary(&mut unstructured).unwrap_or_default()
30806    }
30807}
30808impl Default for TARGET_ABSOLUTE_DATA {
30809    fn default() -> Self {
30810        Self::DEFAULT.clone()
30811    }
30812}
30813impl MessageData for TARGET_ABSOLUTE_DATA {
30814    type Message = MavMessage;
30815    const ID: u32 = 510u32;
30816    const NAME: &'static str = "TARGET_ABSOLUTE";
30817    const EXTRA_CRC: u8 = 245u8;
30818    const ENCODED_LEN: usize = 106usize;
30819    fn deser(
30820        _version: MavlinkVersion,
30821        __input: &[u8],
30822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30823        let avail_len = __input.len();
30824        let mut payload_buf = [0; Self::ENCODED_LEN];
30825        let mut buf = if avail_len < Self::ENCODED_LEN {
30826            payload_buf[0..avail_len].copy_from_slice(__input);
30827            Bytes::new(&payload_buf)
30828        } else {
30829            Bytes::new(__input)
30830        };
30831        let mut __struct = Self::default();
30832        __struct.timestamp = buf.get_u64_le();
30833        __struct.lat = buf.get_i32_le();
30834        __struct.lon = buf.get_i32_le();
30835        __struct.alt = buf.get_f32_le();
30836        for v in &mut __struct.vel {
30837            let val = buf.get_f32_le();
30838            *v = val;
30839        }
30840        for v in &mut __struct.acc {
30841            let val = buf.get_f32_le();
30842            *v = val;
30843        }
30844        for v in &mut __struct.q_target {
30845            let val = buf.get_f32_le();
30846            *v = val;
30847        }
30848        for v in &mut __struct.rates {
30849            let val = buf.get_f32_le();
30850            *v = val;
30851        }
30852        for v in &mut __struct.position_std {
30853            let val = buf.get_f32_le();
30854            *v = val;
30855        }
30856        for v in &mut __struct.vel_std {
30857            let val = buf.get_f32_le();
30858            *v = val;
30859        }
30860        for v in &mut __struct.acc_std {
30861            let val = buf.get_f32_le();
30862            *v = val;
30863        }
30864        __struct.id = buf.get_u8();
30865        let tmp = buf.get_u8();
30866        __struct.sensor_capabilities = TargetAbsoluteSensorCapabilityFlags::from_bits(
30867            tmp & TargetAbsoluteSensorCapabilityFlags::all().bits(),
30868        )
30869        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30870            flag_type: "TargetAbsoluteSensorCapabilityFlags",
30871            value: tmp as u32,
30872        })?;
30873        Ok(__struct)
30874    }
30875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30876        let mut __tmp = BytesMut::new(bytes);
30877        #[allow(clippy::absurd_extreme_comparisons)]
30878        #[allow(unused_comparisons)]
30879        if __tmp.remaining() < Self::ENCODED_LEN {
30880            panic!(
30881                "buffer is too small (need {} bytes, but got {})",
30882                Self::ENCODED_LEN,
30883                __tmp.remaining(),
30884            )
30885        }
30886        __tmp.put_u64_le(self.timestamp);
30887        __tmp.put_i32_le(self.lat);
30888        __tmp.put_i32_le(self.lon);
30889        __tmp.put_f32_le(self.alt);
30890        for val in &self.vel {
30891            __tmp.put_f32_le(*val);
30892        }
30893        for val in &self.acc {
30894            __tmp.put_f32_le(*val);
30895        }
30896        for val in &self.q_target {
30897            __tmp.put_f32_le(*val);
30898        }
30899        for val in &self.rates {
30900            __tmp.put_f32_le(*val);
30901        }
30902        for val in &self.position_std {
30903            __tmp.put_f32_le(*val);
30904        }
30905        for val in &self.vel_std {
30906            __tmp.put_f32_le(*val);
30907        }
30908        for val in &self.acc_std {
30909            __tmp.put_f32_le(*val);
30910        }
30911        __tmp.put_u8(self.id);
30912        __tmp.put_u8(self.sensor_capabilities.bits());
30913        if matches!(version, MavlinkVersion::V2) {
30914            let len = __tmp.len();
30915            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30916        } else {
30917            __tmp.len()
30918        }
30919    }
30920}
30921#[doc = "The location of a target measured by MAV's onboard sensors."]
30922#[doc = ""]
30923#[doc = "ID: 511"]
30924#[derive(Debug, Clone, PartialEq)]
30925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30927#[cfg_attr(feature = "ts", derive(TS))]
30928#[cfg_attr(feature = "ts", ts(export))]
30929pub struct TARGET_RELATIVE_DATA {
30930    #[doc = "Timestamp (UNIX epoch time)"]
30931    pub timestamp: u64,
30932    #[doc = "X Position of the target in TARGET_OBS_FRAME"]
30933    pub x: f32,
30934    #[doc = "Y Position of the target in TARGET_OBS_FRAME"]
30935    pub y: f32,
30936    #[doc = "Z Position of the target in TARGET_OBS_FRAME"]
30937    pub z: f32,
30938    #[doc = "Standard deviation of the target's position in TARGET_OBS_FRAME"]
30939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30940    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30941    pub pos_std: [f32; 3],
30942    #[doc = "Standard deviation of the target's orientation in TARGET_OBS_FRAME"]
30943    pub yaw_std: f32,
30944    #[doc = "Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30947    pub q_target: [f32; 4],
30948    #[doc = "Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30950    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30951    pub q_sensor: [f32; 4],
30952    #[doc = "The ID of the target if multiple targets are present"]
30953    pub id: u8,
30954    #[doc = "Coordinate frame used for following fields."]
30955    pub frame: TargetObsFrame,
30956    #[doc = "Type of target"]
30957    pub mavtype: LandingTargetType,
30958}
30959impl TARGET_RELATIVE_DATA {
30960    pub const ENCODED_LEN: usize = 71usize;
30961    pub const DEFAULT: Self = Self {
30962        timestamp: 0_u64,
30963        x: 0.0_f32,
30964        y: 0.0_f32,
30965        z: 0.0_f32,
30966        pos_std: [0.0_f32; 3usize],
30967        yaw_std: 0.0_f32,
30968        q_target: [0.0_f32; 4usize],
30969        q_sensor: [0.0_f32; 4usize],
30970        id: 0_u8,
30971        frame: TargetObsFrame::DEFAULT,
30972        mavtype: LandingTargetType::DEFAULT,
30973    };
30974    #[cfg(feature = "arbitrary")]
30975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30976        use arbitrary::{Arbitrary, Unstructured};
30977        let mut buf = [0u8; 1024];
30978        rng.fill_bytes(&mut buf);
30979        let mut unstructured = Unstructured::new(&buf);
30980        Self::arbitrary(&mut unstructured).unwrap_or_default()
30981    }
30982}
30983impl Default for TARGET_RELATIVE_DATA {
30984    fn default() -> Self {
30985        Self::DEFAULT.clone()
30986    }
30987}
30988impl MessageData for TARGET_RELATIVE_DATA {
30989    type Message = MavMessage;
30990    const ID: u32 = 511u32;
30991    const NAME: &'static str = "TARGET_RELATIVE";
30992    const EXTRA_CRC: u8 = 28u8;
30993    const ENCODED_LEN: usize = 71usize;
30994    fn deser(
30995        _version: MavlinkVersion,
30996        __input: &[u8],
30997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30998        let avail_len = __input.len();
30999        let mut payload_buf = [0; Self::ENCODED_LEN];
31000        let mut buf = if avail_len < Self::ENCODED_LEN {
31001            payload_buf[0..avail_len].copy_from_slice(__input);
31002            Bytes::new(&payload_buf)
31003        } else {
31004            Bytes::new(__input)
31005        };
31006        let mut __struct = Self::default();
31007        __struct.timestamp = buf.get_u64_le();
31008        __struct.x = buf.get_f32_le();
31009        __struct.y = buf.get_f32_le();
31010        __struct.z = buf.get_f32_le();
31011        for v in &mut __struct.pos_std {
31012            let val = buf.get_f32_le();
31013            *v = val;
31014        }
31015        __struct.yaw_std = buf.get_f32_le();
31016        for v in &mut __struct.q_target {
31017            let val = buf.get_f32_le();
31018            *v = val;
31019        }
31020        for v in &mut __struct.q_sensor {
31021            let val = buf.get_f32_le();
31022            *v = val;
31023        }
31024        __struct.id = buf.get_u8();
31025        let tmp = buf.get_u8();
31026        __struct.frame =
31027            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31028                enum_type: "TargetObsFrame",
31029                value: tmp as u32,
31030            })?;
31031        let tmp = buf.get_u8();
31032        __struct.mavtype =
31033            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31034                enum_type: "LandingTargetType",
31035                value: tmp as u32,
31036            })?;
31037        Ok(__struct)
31038    }
31039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31040        let mut __tmp = BytesMut::new(bytes);
31041        #[allow(clippy::absurd_extreme_comparisons)]
31042        #[allow(unused_comparisons)]
31043        if __tmp.remaining() < Self::ENCODED_LEN {
31044            panic!(
31045                "buffer is too small (need {} bytes, but got {})",
31046                Self::ENCODED_LEN,
31047                __tmp.remaining(),
31048            )
31049        }
31050        __tmp.put_u64_le(self.timestamp);
31051        __tmp.put_f32_le(self.x);
31052        __tmp.put_f32_le(self.y);
31053        __tmp.put_f32_le(self.z);
31054        for val in &self.pos_std {
31055            __tmp.put_f32_le(*val);
31056        }
31057        __tmp.put_f32_le(self.yaw_std);
31058        for val in &self.q_target {
31059            __tmp.put_f32_le(*val);
31060        }
31061        for val in &self.q_sensor {
31062            __tmp.put_f32_le(*val);
31063        }
31064        __tmp.put_u8(self.id);
31065        __tmp.put_u8(self.frame as u8);
31066        __tmp.put_u8(self.mavtype as u8);
31067        if matches!(version, MavlinkVersion::V2) {
31068            let len = __tmp.len();
31069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31070        } else {
31071            __tmp.len()
31072        }
31073    }
31074}
31075#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31076#[doc = ""]
31077#[doc = "ID: 135"]
31078#[derive(Debug, Clone, PartialEq)]
31079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31081#[cfg_attr(feature = "ts", derive(TS))]
31082#[cfg_attr(feature = "ts", ts(export))]
31083pub struct TERRAIN_CHECK_DATA {
31084    #[doc = "Latitude"]
31085    pub lat: i32,
31086    #[doc = "Longitude"]
31087    pub lon: i32,
31088}
31089impl TERRAIN_CHECK_DATA {
31090    pub const ENCODED_LEN: usize = 8usize;
31091    pub const DEFAULT: Self = Self {
31092        lat: 0_i32,
31093        lon: 0_i32,
31094    };
31095    #[cfg(feature = "arbitrary")]
31096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31097        use arbitrary::{Arbitrary, Unstructured};
31098        let mut buf = [0u8; 1024];
31099        rng.fill_bytes(&mut buf);
31100        let mut unstructured = Unstructured::new(&buf);
31101        Self::arbitrary(&mut unstructured).unwrap_or_default()
31102    }
31103}
31104impl Default for TERRAIN_CHECK_DATA {
31105    fn default() -> Self {
31106        Self::DEFAULT.clone()
31107    }
31108}
31109impl MessageData for TERRAIN_CHECK_DATA {
31110    type Message = MavMessage;
31111    const ID: u32 = 135u32;
31112    const NAME: &'static str = "TERRAIN_CHECK";
31113    const EXTRA_CRC: u8 = 203u8;
31114    const ENCODED_LEN: usize = 8usize;
31115    fn deser(
31116        _version: MavlinkVersion,
31117        __input: &[u8],
31118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31119        let avail_len = __input.len();
31120        let mut payload_buf = [0; Self::ENCODED_LEN];
31121        let mut buf = if avail_len < Self::ENCODED_LEN {
31122            payload_buf[0..avail_len].copy_from_slice(__input);
31123            Bytes::new(&payload_buf)
31124        } else {
31125            Bytes::new(__input)
31126        };
31127        let mut __struct = Self::default();
31128        __struct.lat = buf.get_i32_le();
31129        __struct.lon = buf.get_i32_le();
31130        Ok(__struct)
31131    }
31132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31133        let mut __tmp = BytesMut::new(bytes);
31134        #[allow(clippy::absurd_extreme_comparisons)]
31135        #[allow(unused_comparisons)]
31136        if __tmp.remaining() < Self::ENCODED_LEN {
31137            panic!(
31138                "buffer is too small (need {} bytes, but got {})",
31139                Self::ENCODED_LEN,
31140                __tmp.remaining(),
31141            )
31142        }
31143        __tmp.put_i32_le(self.lat);
31144        __tmp.put_i32_le(self.lon);
31145        if matches!(version, MavlinkVersion::V2) {
31146            let len = __tmp.len();
31147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31148        } else {
31149            __tmp.len()
31150        }
31151    }
31152}
31153#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31154#[doc = ""]
31155#[doc = "ID: 134"]
31156#[derive(Debug, Clone, PartialEq)]
31157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31159#[cfg_attr(feature = "ts", derive(TS))]
31160#[cfg_attr(feature = "ts", ts(export))]
31161pub struct TERRAIN_DATA_DATA {
31162    #[doc = "Latitude of SW corner of first grid"]
31163    pub lat: i32,
31164    #[doc = "Longitude of SW corner of first grid"]
31165    pub lon: i32,
31166    #[doc = "Grid spacing"]
31167    pub grid_spacing: u16,
31168    #[doc = "Terrain data MSL"]
31169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31170    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31171    pub data: [i16; 16],
31172    #[doc = "bit within the terrain request mask"]
31173    pub gridbit: u8,
31174}
31175impl TERRAIN_DATA_DATA {
31176    pub const ENCODED_LEN: usize = 43usize;
31177    pub const DEFAULT: Self = Self {
31178        lat: 0_i32,
31179        lon: 0_i32,
31180        grid_spacing: 0_u16,
31181        data: [0_i16; 16usize],
31182        gridbit: 0_u8,
31183    };
31184    #[cfg(feature = "arbitrary")]
31185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31186        use arbitrary::{Arbitrary, Unstructured};
31187        let mut buf = [0u8; 1024];
31188        rng.fill_bytes(&mut buf);
31189        let mut unstructured = Unstructured::new(&buf);
31190        Self::arbitrary(&mut unstructured).unwrap_or_default()
31191    }
31192}
31193impl Default for TERRAIN_DATA_DATA {
31194    fn default() -> Self {
31195        Self::DEFAULT.clone()
31196    }
31197}
31198impl MessageData for TERRAIN_DATA_DATA {
31199    type Message = MavMessage;
31200    const ID: u32 = 134u32;
31201    const NAME: &'static str = "TERRAIN_DATA";
31202    const EXTRA_CRC: u8 = 229u8;
31203    const ENCODED_LEN: usize = 43usize;
31204    fn deser(
31205        _version: MavlinkVersion,
31206        __input: &[u8],
31207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31208        let avail_len = __input.len();
31209        let mut payload_buf = [0; Self::ENCODED_LEN];
31210        let mut buf = if avail_len < Self::ENCODED_LEN {
31211            payload_buf[0..avail_len].copy_from_slice(__input);
31212            Bytes::new(&payload_buf)
31213        } else {
31214            Bytes::new(__input)
31215        };
31216        let mut __struct = Self::default();
31217        __struct.lat = buf.get_i32_le();
31218        __struct.lon = buf.get_i32_le();
31219        __struct.grid_spacing = buf.get_u16_le();
31220        for v in &mut __struct.data {
31221            let val = buf.get_i16_le();
31222            *v = val;
31223        }
31224        __struct.gridbit = buf.get_u8();
31225        Ok(__struct)
31226    }
31227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31228        let mut __tmp = BytesMut::new(bytes);
31229        #[allow(clippy::absurd_extreme_comparisons)]
31230        #[allow(unused_comparisons)]
31231        if __tmp.remaining() < Self::ENCODED_LEN {
31232            panic!(
31233                "buffer is too small (need {} bytes, but got {})",
31234                Self::ENCODED_LEN,
31235                __tmp.remaining(),
31236            )
31237        }
31238        __tmp.put_i32_le(self.lat);
31239        __tmp.put_i32_le(self.lon);
31240        __tmp.put_u16_le(self.grid_spacing);
31241        for val in &self.data {
31242            __tmp.put_i16_le(*val);
31243        }
31244        __tmp.put_u8(self.gridbit);
31245        if matches!(version, MavlinkVersion::V2) {
31246            let len = __tmp.len();
31247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31248        } else {
31249            __tmp.len()
31250        }
31251    }
31252}
31253#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31254#[doc = ""]
31255#[doc = "ID: 136"]
31256#[derive(Debug, Clone, PartialEq)]
31257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31259#[cfg_attr(feature = "ts", derive(TS))]
31260#[cfg_attr(feature = "ts", ts(export))]
31261pub struct TERRAIN_REPORT_DATA {
31262    #[doc = "Latitude"]
31263    pub lat: i32,
31264    #[doc = "Longitude"]
31265    pub lon: i32,
31266    #[doc = "Terrain height MSL"]
31267    pub terrain_height: f32,
31268    #[doc = "Current vehicle height above lat/lon terrain height"]
31269    pub current_height: f32,
31270    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31271    pub spacing: u16,
31272    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31273    pub pending: u16,
31274    #[doc = "Number of 4x4 terrain blocks in memory"]
31275    pub loaded: u16,
31276}
31277impl TERRAIN_REPORT_DATA {
31278    pub const ENCODED_LEN: usize = 22usize;
31279    pub const DEFAULT: Self = Self {
31280        lat: 0_i32,
31281        lon: 0_i32,
31282        terrain_height: 0.0_f32,
31283        current_height: 0.0_f32,
31284        spacing: 0_u16,
31285        pending: 0_u16,
31286        loaded: 0_u16,
31287    };
31288    #[cfg(feature = "arbitrary")]
31289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31290        use arbitrary::{Arbitrary, Unstructured};
31291        let mut buf = [0u8; 1024];
31292        rng.fill_bytes(&mut buf);
31293        let mut unstructured = Unstructured::new(&buf);
31294        Self::arbitrary(&mut unstructured).unwrap_or_default()
31295    }
31296}
31297impl Default for TERRAIN_REPORT_DATA {
31298    fn default() -> Self {
31299        Self::DEFAULT.clone()
31300    }
31301}
31302impl MessageData for TERRAIN_REPORT_DATA {
31303    type Message = MavMessage;
31304    const ID: u32 = 136u32;
31305    const NAME: &'static str = "TERRAIN_REPORT";
31306    const EXTRA_CRC: u8 = 1u8;
31307    const ENCODED_LEN: usize = 22usize;
31308    fn deser(
31309        _version: MavlinkVersion,
31310        __input: &[u8],
31311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31312        let avail_len = __input.len();
31313        let mut payload_buf = [0; Self::ENCODED_LEN];
31314        let mut buf = if avail_len < Self::ENCODED_LEN {
31315            payload_buf[0..avail_len].copy_from_slice(__input);
31316            Bytes::new(&payload_buf)
31317        } else {
31318            Bytes::new(__input)
31319        };
31320        let mut __struct = Self::default();
31321        __struct.lat = buf.get_i32_le();
31322        __struct.lon = buf.get_i32_le();
31323        __struct.terrain_height = buf.get_f32_le();
31324        __struct.current_height = buf.get_f32_le();
31325        __struct.spacing = buf.get_u16_le();
31326        __struct.pending = buf.get_u16_le();
31327        __struct.loaded = buf.get_u16_le();
31328        Ok(__struct)
31329    }
31330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31331        let mut __tmp = BytesMut::new(bytes);
31332        #[allow(clippy::absurd_extreme_comparisons)]
31333        #[allow(unused_comparisons)]
31334        if __tmp.remaining() < Self::ENCODED_LEN {
31335            panic!(
31336                "buffer is too small (need {} bytes, but got {})",
31337                Self::ENCODED_LEN,
31338                __tmp.remaining(),
31339            )
31340        }
31341        __tmp.put_i32_le(self.lat);
31342        __tmp.put_i32_le(self.lon);
31343        __tmp.put_f32_le(self.terrain_height);
31344        __tmp.put_f32_le(self.current_height);
31345        __tmp.put_u16_le(self.spacing);
31346        __tmp.put_u16_le(self.pending);
31347        __tmp.put_u16_le(self.loaded);
31348        if matches!(version, MavlinkVersion::V2) {
31349            let len = __tmp.len();
31350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31351        } else {
31352            __tmp.len()
31353        }
31354    }
31355}
31356#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31357#[doc = ""]
31358#[doc = "ID: 133"]
31359#[derive(Debug, Clone, PartialEq)]
31360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31362#[cfg_attr(feature = "ts", derive(TS))]
31363#[cfg_attr(feature = "ts", ts(export))]
31364pub struct TERRAIN_REQUEST_DATA {
31365    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31366    pub mask: u64,
31367    #[doc = "Latitude of SW corner of first grid"]
31368    pub lat: i32,
31369    #[doc = "Longitude of SW corner of first grid"]
31370    pub lon: i32,
31371    #[doc = "Grid spacing"]
31372    pub grid_spacing: u16,
31373}
31374impl TERRAIN_REQUEST_DATA {
31375    pub const ENCODED_LEN: usize = 18usize;
31376    pub const DEFAULT: Self = Self {
31377        mask: 0_u64,
31378        lat: 0_i32,
31379        lon: 0_i32,
31380        grid_spacing: 0_u16,
31381    };
31382    #[cfg(feature = "arbitrary")]
31383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31384        use arbitrary::{Arbitrary, Unstructured};
31385        let mut buf = [0u8; 1024];
31386        rng.fill_bytes(&mut buf);
31387        let mut unstructured = Unstructured::new(&buf);
31388        Self::arbitrary(&mut unstructured).unwrap_or_default()
31389    }
31390}
31391impl Default for TERRAIN_REQUEST_DATA {
31392    fn default() -> Self {
31393        Self::DEFAULT.clone()
31394    }
31395}
31396impl MessageData for TERRAIN_REQUEST_DATA {
31397    type Message = MavMessage;
31398    const ID: u32 = 133u32;
31399    const NAME: &'static str = "TERRAIN_REQUEST";
31400    const EXTRA_CRC: u8 = 6u8;
31401    const ENCODED_LEN: usize = 18usize;
31402    fn deser(
31403        _version: MavlinkVersion,
31404        __input: &[u8],
31405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31406        let avail_len = __input.len();
31407        let mut payload_buf = [0; Self::ENCODED_LEN];
31408        let mut buf = if avail_len < Self::ENCODED_LEN {
31409            payload_buf[0..avail_len].copy_from_slice(__input);
31410            Bytes::new(&payload_buf)
31411        } else {
31412            Bytes::new(__input)
31413        };
31414        let mut __struct = Self::default();
31415        __struct.mask = buf.get_u64_le();
31416        __struct.lat = buf.get_i32_le();
31417        __struct.lon = buf.get_i32_le();
31418        __struct.grid_spacing = buf.get_u16_le();
31419        Ok(__struct)
31420    }
31421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31422        let mut __tmp = BytesMut::new(bytes);
31423        #[allow(clippy::absurd_extreme_comparisons)]
31424        #[allow(unused_comparisons)]
31425        if __tmp.remaining() < Self::ENCODED_LEN {
31426            panic!(
31427                "buffer is too small (need {} bytes, but got {})",
31428                Self::ENCODED_LEN,
31429                __tmp.remaining(),
31430            )
31431        }
31432        __tmp.put_u64_le(self.mask);
31433        __tmp.put_i32_le(self.lat);
31434        __tmp.put_i32_le(self.lon);
31435        __tmp.put_u16_le(self.grid_spacing);
31436        if matches!(version, MavlinkVersion::V2) {
31437            let len = __tmp.len();
31438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31439        } else {
31440            __tmp.len()
31441        }
31442    }
31443}
31444#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31445#[doc = ""]
31446#[doc = "ID: 111"]
31447#[derive(Debug, Clone, PartialEq)]
31448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31450#[cfg_attr(feature = "ts", derive(TS))]
31451#[cfg_attr(feature = "ts", ts(export))]
31452pub struct TIMESYNC_DATA {
31453    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31454    pub tc1: i64,
31455    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31456    pub ts1: i64,
31457    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31458    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31459    pub target_system: u8,
31460    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31462    pub target_component: u8,
31463}
31464impl TIMESYNC_DATA {
31465    pub const ENCODED_LEN: usize = 18usize;
31466    pub const DEFAULT: Self = Self {
31467        tc1: 0_i64,
31468        ts1: 0_i64,
31469        target_system: 0_u8,
31470        target_component: 0_u8,
31471    };
31472    #[cfg(feature = "arbitrary")]
31473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31474        use arbitrary::{Arbitrary, Unstructured};
31475        let mut buf = [0u8; 1024];
31476        rng.fill_bytes(&mut buf);
31477        let mut unstructured = Unstructured::new(&buf);
31478        Self::arbitrary(&mut unstructured).unwrap_or_default()
31479    }
31480}
31481impl Default for TIMESYNC_DATA {
31482    fn default() -> Self {
31483        Self::DEFAULT.clone()
31484    }
31485}
31486impl MessageData for TIMESYNC_DATA {
31487    type Message = MavMessage;
31488    const ID: u32 = 111u32;
31489    const NAME: &'static str = "TIMESYNC";
31490    const EXTRA_CRC: u8 = 34u8;
31491    const ENCODED_LEN: usize = 18usize;
31492    fn deser(
31493        _version: MavlinkVersion,
31494        __input: &[u8],
31495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31496        let avail_len = __input.len();
31497        let mut payload_buf = [0; Self::ENCODED_LEN];
31498        let mut buf = if avail_len < Self::ENCODED_LEN {
31499            payload_buf[0..avail_len].copy_from_slice(__input);
31500            Bytes::new(&payload_buf)
31501        } else {
31502            Bytes::new(__input)
31503        };
31504        let mut __struct = Self::default();
31505        __struct.tc1 = buf.get_i64_le();
31506        __struct.ts1 = buf.get_i64_le();
31507        __struct.target_system = buf.get_u8();
31508        __struct.target_component = buf.get_u8();
31509        Ok(__struct)
31510    }
31511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31512        let mut __tmp = BytesMut::new(bytes);
31513        #[allow(clippy::absurd_extreme_comparisons)]
31514        #[allow(unused_comparisons)]
31515        if __tmp.remaining() < Self::ENCODED_LEN {
31516            panic!(
31517                "buffer is too small (need {} bytes, but got {})",
31518                Self::ENCODED_LEN,
31519                __tmp.remaining(),
31520            )
31521        }
31522        __tmp.put_i64_le(self.tc1);
31523        __tmp.put_i64_le(self.ts1);
31524        if matches!(version, MavlinkVersion::V2) {
31525            __tmp.put_u8(self.target_system);
31526            __tmp.put_u8(self.target_component);
31527            let len = __tmp.len();
31528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31529        } else {
31530            __tmp.len()
31531        }
31532    }
31533}
31534#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31535#[doc = ""]
31536#[doc = "ID: 380"]
31537#[derive(Debug, Clone, PartialEq)]
31538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31540#[cfg_attr(feature = "ts", derive(TS))]
31541#[cfg_attr(feature = "ts", ts(export))]
31542pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31543    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31544    pub safe_return: i32,
31545    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31546    pub land: i32,
31547    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31548    pub mission_next_item: i32,
31549    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31550    pub mission_end: i32,
31551    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31552    pub commanded_action: i32,
31553}
31554impl TIME_ESTIMATE_TO_TARGET_DATA {
31555    pub const ENCODED_LEN: usize = 20usize;
31556    pub const DEFAULT: Self = Self {
31557        safe_return: 0_i32,
31558        land: 0_i32,
31559        mission_next_item: 0_i32,
31560        mission_end: 0_i32,
31561        commanded_action: 0_i32,
31562    };
31563    #[cfg(feature = "arbitrary")]
31564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31565        use arbitrary::{Arbitrary, Unstructured};
31566        let mut buf = [0u8; 1024];
31567        rng.fill_bytes(&mut buf);
31568        let mut unstructured = Unstructured::new(&buf);
31569        Self::arbitrary(&mut unstructured).unwrap_or_default()
31570    }
31571}
31572impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31573    fn default() -> Self {
31574        Self::DEFAULT.clone()
31575    }
31576}
31577impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31578    type Message = MavMessage;
31579    const ID: u32 = 380u32;
31580    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31581    const EXTRA_CRC: u8 = 232u8;
31582    const ENCODED_LEN: usize = 20usize;
31583    fn deser(
31584        _version: MavlinkVersion,
31585        __input: &[u8],
31586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31587        let avail_len = __input.len();
31588        let mut payload_buf = [0; Self::ENCODED_LEN];
31589        let mut buf = if avail_len < Self::ENCODED_LEN {
31590            payload_buf[0..avail_len].copy_from_slice(__input);
31591            Bytes::new(&payload_buf)
31592        } else {
31593            Bytes::new(__input)
31594        };
31595        let mut __struct = Self::default();
31596        __struct.safe_return = buf.get_i32_le();
31597        __struct.land = buf.get_i32_le();
31598        __struct.mission_next_item = buf.get_i32_le();
31599        __struct.mission_end = buf.get_i32_le();
31600        __struct.commanded_action = buf.get_i32_le();
31601        Ok(__struct)
31602    }
31603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31604        let mut __tmp = BytesMut::new(bytes);
31605        #[allow(clippy::absurd_extreme_comparisons)]
31606        #[allow(unused_comparisons)]
31607        if __tmp.remaining() < Self::ENCODED_LEN {
31608            panic!(
31609                "buffer is too small (need {} bytes, but got {})",
31610                Self::ENCODED_LEN,
31611                __tmp.remaining(),
31612            )
31613        }
31614        __tmp.put_i32_le(self.safe_return);
31615        __tmp.put_i32_le(self.land);
31616        __tmp.put_i32_le(self.mission_next_item);
31617        __tmp.put_i32_le(self.mission_end);
31618        __tmp.put_i32_le(self.commanded_action);
31619        if matches!(version, MavlinkVersion::V2) {
31620            let len = __tmp.len();
31621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31622        } else {
31623            __tmp.len()
31624        }
31625    }
31626}
31627#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31628#[doc = ""]
31629#[doc = "ID: 333"]
31630#[derive(Debug, Clone, PartialEq)]
31631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31633#[cfg_attr(feature = "ts", derive(TS))]
31634#[cfg_attr(feature = "ts", ts(export))]
31635pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31636    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31637    pub time_usec: u64,
31638    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31640    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31641    pub pos_x: [f32; 5],
31642    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31645    pub pos_y: [f32; 5],
31646    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31647    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31648    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31649    pub pos_z: [f32; 5],
31650    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31651    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31652    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31653    pub delta: [f32; 5],
31654    #[doc = "Yaw. Set to NaN for unchanged"]
31655    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31656    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31657    pub pos_yaw: [f32; 5],
31658    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31659    pub valid_points: u8,
31660}
31661impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31662    pub const ENCODED_LEN: usize = 109usize;
31663    pub const DEFAULT: Self = Self {
31664        time_usec: 0_u64,
31665        pos_x: [0.0_f32; 5usize],
31666        pos_y: [0.0_f32; 5usize],
31667        pos_z: [0.0_f32; 5usize],
31668        delta: [0.0_f32; 5usize],
31669        pos_yaw: [0.0_f32; 5usize],
31670        valid_points: 0_u8,
31671    };
31672    #[cfg(feature = "arbitrary")]
31673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31674        use arbitrary::{Arbitrary, Unstructured};
31675        let mut buf = [0u8; 1024];
31676        rng.fill_bytes(&mut buf);
31677        let mut unstructured = Unstructured::new(&buf);
31678        Self::arbitrary(&mut unstructured).unwrap_or_default()
31679    }
31680}
31681impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31682    fn default() -> Self {
31683        Self::DEFAULT.clone()
31684    }
31685}
31686impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31687    type Message = MavMessage;
31688    const ID: u32 = 333u32;
31689    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31690    const EXTRA_CRC: u8 = 231u8;
31691    const ENCODED_LEN: usize = 109usize;
31692    fn deser(
31693        _version: MavlinkVersion,
31694        __input: &[u8],
31695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31696        let avail_len = __input.len();
31697        let mut payload_buf = [0; Self::ENCODED_LEN];
31698        let mut buf = if avail_len < Self::ENCODED_LEN {
31699            payload_buf[0..avail_len].copy_from_slice(__input);
31700            Bytes::new(&payload_buf)
31701        } else {
31702            Bytes::new(__input)
31703        };
31704        let mut __struct = Self::default();
31705        __struct.time_usec = buf.get_u64_le();
31706        for v in &mut __struct.pos_x {
31707            let val = buf.get_f32_le();
31708            *v = val;
31709        }
31710        for v in &mut __struct.pos_y {
31711            let val = buf.get_f32_le();
31712            *v = val;
31713        }
31714        for v in &mut __struct.pos_z {
31715            let val = buf.get_f32_le();
31716            *v = val;
31717        }
31718        for v in &mut __struct.delta {
31719            let val = buf.get_f32_le();
31720            *v = val;
31721        }
31722        for v in &mut __struct.pos_yaw {
31723            let val = buf.get_f32_le();
31724            *v = val;
31725        }
31726        __struct.valid_points = buf.get_u8();
31727        Ok(__struct)
31728    }
31729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31730        let mut __tmp = BytesMut::new(bytes);
31731        #[allow(clippy::absurd_extreme_comparisons)]
31732        #[allow(unused_comparisons)]
31733        if __tmp.remaining() < Self::ENCODED_LEN {
31734            panic!(
31735                "buffer is too small (need {} bytes, but got {})",
31736                Self::ENCODED_LEN,
31737                __tmp.remaining(),
31738            )
31739        }
31740        __tmp.put_u64_le(self.time_usec);
31741        for val in &self.pos_x {
31742            __tmp.put_f32_le(*val);
31743        }
31744        for val in &self.pos_y {
31745            __tmp.put_f32_le(*val);
31746        }
31747        for val in &self.pos_z {
31748            __tmp.put_f32_le(*val);
31749        }
31750        for val in &self.delta {
31751            __tmp.put_f32_le(*val);
31752        }
31753        for val in &self.pos_yaw {
31754            __tmp.put_f32_le(*val);
31755        }
31756        __tmp.put_u8(self.valid_points);
31757        if matches!(version, MavlinkVersion::V2) {
31758            let len = __tmp.len();
31759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31760        } else {
31761            __tmp.len()
31762        }
31763    }
31764}
31765#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31766#[doc = ""]
31767#[doc = "ID: 332"]
31768#[derive(Debug, Clone, PartialEq)]
31769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31771#[cfg_attr(feature = "ts", derive(TS))]
31772#[cfg_attr(feature = "ts", ts(export))]
31773pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31774    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31775    pub time_usec: u64,
31776    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31779    pub pos_x: [f32; 5],
31780    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31781    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31782    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31783    pub pos_y: [f32; 5],
31784    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31786    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31787    pub pos_z: [f32; 5],
31788    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31791    pub vel_x: [f32; 5],
31792    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31793    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31794    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31795    pub vel_y: [f32; 5],
31796    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31799    pub vel_z: [f32; 5],
31800    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31802    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31803    pub acc_x: [f32; 5],
31804    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31805    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31806    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31807    pub acc_y: [f32; 5],
31808    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31809    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31810    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31811    pub acc_z: [f32; 5],
31812    #[doc = "Yaw angle, set to NaN if not being used"]
31813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31814    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31815    pub pos_yaw: [f32; 5],
31816    #[doc = "Yaw rate, set to NaN if not being used"]
31817    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31818    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31819    pub vel_yaw: [f32; 5],
31820    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31821    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31822    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31823    pub command: [u16; 5],
31824    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31825    pub valid_points: u8,
31826}
31827impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31828    pub const ENCODED_LEN: usize = 239usize;
31829    pub const DEFAULT: Self = Self {
31830        time_usec: 0_u64,
31831        pos_x: [0.0_f32; 5usize],
31832        pos_y: [0.0_f32; 5usize],
31833        pos_z: [0.0_f32; 5usize],
31834        vel_x: [0.0_f32; 5usize],
31835        vel_y: [0.0_f32; 5usize],
31836        vel_z: [0.0_f32; 5usize],
31837        acc_x: [0.0_f32; 5usize],
31838        acc_y: [0.0_f32; 5usize],
31839        acc_z: [0.0_f32; 5usize],
31840        pos_yaw: [0.0_f32; 5usize],
31841        vel_yaw: [0.0_f32; 5usize],
31842        command: [0_u16; 5usize],
31843        valid_points: 0_u8,
31844    };
31845    #[cfg(feature = "arbitrary")]
31846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31847        use arbitrary::{Arbitrary, Unstructured};
31848        let mut buf = [0u8; 1024];
31849        rng.fill_bytes(&mut buf);
31850        let mut unstructured = Unstructured::new(&buf);
31851        Self::arbitrary(&mut unstructured).unwrap_or_default()
31852    }
31853}
31854impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31855    fn default() -> Self {
31856        Self::DEFAULT.clone()
31857    }
31858}
31859impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31860    type Message = MavMessage;
31861    const ID: u32 = 332u32;
31862    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31863    const EXTRA_CRC: u8 = 236u8;
31864    const ENCODED_LEN: usize = 239usize;
31865    fn deser(
31866        _version: MavlinkVersion,
31867        __input: &[u8],
31868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31869        let avail_len = __input.len();
31870        let mut payload_buf = [0; Self::ENCODED_LEN];
31871        let mut buf = if avail_len < Self::ENCODED_LEN {
31872            payload_buf[0..avail_len].copy_from_slice(__input);
31873            Bytes::new(&payload_buf)
31874        } else {
31875            Bytes::new(__input)
31876        };
31877        let mut __struct = Self::default();
31878        __struct.time_usec = buf.get_u64_le();
31879        for v in &mut __struct.pos_x {
31880            let val = buf.get_f32_le();
31881            *v = val;
31882        }
31883        for v in &mut __struct.pos_y {
31884            let val = buf.get_f32_le();
31885            *v = val;
31886        }
31887        for v in &mut __struct.pos_z {
31888            let val = buf.get_f32_le();
31889            *v = val;
31890        }
31891        for v in &mut __struct.vel_x {
31892            let val = buf.get_f32_le();
31893            *v = val;
31894        }
31895        for v in &mut __struct.vel_y {
31896            let val = buf.get_f32_le();
31897            *v = val;
31898        }
31899        for v in &mut __struct.vel_z {
31900            let val = buf.get_f32_le();
31901            *v = val;
31902        }
31903        for v in &mut __struct.acc_x {
31904            let val = buf.get_f32_le();
31905            *v = val;
31906        }
31907        for v in &mut __struct.acc_y {
31908            let val = buf.get_f32_le();
31909            *v = val;
31910        }
31911        for v in &mut __struct.acc_z {
31912            let val = buf.get_f32_le();
31913            *v = val;
31914        }
31915        for v in &mut __struct.pos_yaw {
31916            let val = buf.get_f32_le();
31917            *v = val;
31918        }
31919        for v in &mut __struct.vel_yaw {
31920            let val = buf.get_f32_le();
31921            *v = val;
31922        }
31923        for v in &mut __struct.command {
31924            let val = buf.get_u16_le();
31925            *v = val;
31926        }
31927        __struct.valid_points = buf.get_u8();
31928        Ok(__struct)
31929    }
31930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31931        let mut __tmp = BytesMut::new(bytes);
31932        #[allow(clippy::absurd_extreme_comparisons)]
31933        #[allow(unused_comparisons)]
31934        if __tmp.remaining() < Self::ENCODED_LEN {
31935            panic!(
31936                "buffer is too small (need {} bytes, but got {})",
31937                Self::ENCODED_LEN,
31938                __tmp.remaining(),
31939            )
31940        }
31941        __tmp.put_u64_le(self.time_usec);
31942        for val in &self.pos_x {
31943            __tmp.put_f32_le(*val);
31944        }
31945        for val in &self.pos_y {
31946            __tmp.put_f32_le(*val);
31947        }
31948        for val in &self.pos_z {
31949            __tmp.put_f32_le(*val);
31950        }
31951        for val in &self.vel_x {
31952            __tmp.put_f32_le(*val);
31953        }
31954        for val in &self.vel_y {
31955            __tmp.put_f32_le(*val);
31956        }
31957        for val in &self.vel_z {
31958            __tmp.put_f32_le(*val);
31959        }
31960        for val in &self.acc_x {
31961            __tmp.put_f32_le(*val);
31962        }
31963        for val in &self.acc_y {
31964            __tmp.put_f32_le(*val);
31965        }
31966        for val in &self.acc_z {
31967            __tmp.put_f32_le(*val);
31968        }
31969        for val in &self.pos_yaw {
31970            __tmp.put_f32_le(*val);
31971        }
31972        for val in &self.vel_yaw {
31973            __tmp.put_f32_le(*val);
31974        }
31975        for val in &self.command {
31976            __tmp.put_u16_le(*val);
31977        }
31978        __tmp.put_u8(self.valid_points);
31979        if matches!(version, MavlinkVersion::V2) {
31980            let len = __tmp.len();
31981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31982        } else {
31983            __tmp.len()
31984        }
31985    }
31986}
31987#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31988#[doc = ""]
31989#[doc = "ID: 385"]
31990#[derive(Debug, Clone, PartialEq)]
31991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31993#[cfg_attr(feature = "ts", derive(TS))]
31994#[cfg_attr(feature = "ts", ts(export))]
31995pub struct TUNNEL_DATA {
31996    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31997    pub payload_type: MavTunnelPayloadType,
31998    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31999    pub target_system: u8,
32000    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32001    pub target_component: u8,
32002    #[doc = "Length of the data transported in payload"]
32003    pub payload_length: u8,
32004    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32005    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32006    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32007    pub payload: [u8; 128],
32008}
32009impl TUNNEL_DATA {
32010    pub const ENCODED_LEN: usize = 133usize;
32011    pub const DEFAULT: Self = Self {
32012        payload_type: MavTunnelPayloadType::DEFAULT,
32013        target_system: 0_u8,
32014        target_component: 0_u8,
32015        payload_length: 0_u8,
32016        payload: [0_u8; 128usize],
32017    };
32018    #[cfg(feature = "arbitrary")]
32019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32020        use arbitrary::{Arbitrary, Unstructured};
32021        let mut buf = [0u8; 1024];
32022        rng.fill_bytes(&mut buf);
32023        let mut unstructured = Unstructured::new(&buf);
32024        Self::arbitrary(&mut unstructured).unwrap_or_default()
32025    }
32026}
32027impl Default for TUNNEL_DATA {
32028    fn default() -> Self {
32029        Self::DEFAULT.clone()
32030    }
32031}
32032impl MessageData for TUNNEL_DATA {
32033    type Message = MavMessage;
32034    const ID: u32 = 385u32;
32035    const NAME: &'static str = "TUNNEL";
32036    const EXTRA_CRC: u8 = 147u8;
32037    const ENCODED_LEN: usize = 133usize;
32038    fn deser(
32039        _version: MavlinkVersion,
32040        __input: &[u8],
32041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32042        let avail_len = __input.len();
32043        let mut payload_buf = [0; Self::ENCODED_LEN];
32044        let mut buf = if avail_len < Self::ENCODED_LEN {
32045            payload_buf[0..avail_len].copy_from_slice(__input);
32046            Bytes::new(&payload_buf)
32047        } else {
32048            Bytes::new(__input)
32049        };
32050        let mut __struct = Self::default();
32051        let tmp = buf.get_u16_le();
32052        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32053            ::mavlink_core::error::ParserError::InvalidEnum {
32054                enum_type: "MavTunnelPayloadType",
32055                value: tmp as u32,
32056            },
32057        )?;
32058        __struct.target_system = buf.get_u8();
32059        __struct.target_component = buf.get_u8();
32060        __struct.payload_length = buf.get_u8();
32061        for v in &mut __struct.payload {
32062            let val = buf.get_u8();
32063            *v = val;
32064        }
32065        Ok(__struct)
32066    }
32067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32068        let mut __tmp = BytesMut::new(bytes);
32069        #[allow(clippy::absurd_extreme_comparisons)]
32070        #[allow(unused_comparisons)]
32071        if __tmp.remaining() < Self::ENCODED_LEN {
32072            panic!(
32073                "buffer is too small (need {} bytes, but got {})",
32074                Self::ENCODED_LEN,
32075                __tmp.remaining(),
32076            )
32077        }
32078        __tmp.put_u16_le(self.payload_type as u16);
32079        __tmp.put_u8(self.target_system);
32080        __tmp.put_u8(self.target_component);
32081        __tmp.put_u8(self.payload_length);
32082        for val in &self.payload {
32083            __tmp.put_u8(*val);
32084        }
32085        if matches!(version, MavlinkVersion::V2) {
32086            let len = __tmp.len();
32087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32088        } else {
32089            __tmp.len()
32090        }
32091    }
32092}
32093#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32094#[doc = ""]
32095#[doc = "ID: 311"]
32096#[derive(Debug, Clone, PartialEq)]
32097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32099#[cfg_attr(feature = "ts", derive(TS))]
32100#[cfg_attr(feature = "ts", ts(export))]
32101pub struct UAVCAN_NODE_INFO_DATA {
32102    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32103    pub time_usec: u64,
32104    #[doc = "Time since the start-up of the node."]
32105    pub uptime_sec: u32,
32106    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32107    pub sw_vcs_commit: u32,
32108    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32109    #[cfg_attr(
32110        feature = "serde",
32111        serde(
32112            serialize_with = "crate::nulstr::serialize::<_, 80>",
32113            deserialize_with = "crate::nulstr::deserialize::<_, 80>"
32114        )
32115    )]
32116    #[cfg_attr(feature = "ts", ts(type = "string"))]
32117    pub name: [u8; 80],
32118    #[doc = "Hardware major version number."]
32119    pub hw_version_major: u8,
32120    #[doc = "Hardware minor version number."]
32121    pub hw_version_minor: u8,
32122    #[doc = "Hardware unique 128-bit ID."]
32123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32125    pub hw_unique_id: [u8; 16],
32126    #[doc = "Software major version number."]
32127    pub sw_version_major: u8,
32128    #[doc = "Software minor version number."]
32129    pub sw_version_minor: u8,
32130}
32131impl UAVCAN_NODE_INFO_DATA {
32132    pub const ENCODED_LEN: usize = 116usize;
32133    pub const DEFAULT: Self = Self {
32134        time_usec: 0_u64,
32135        uptime_sec: 0_u32,
32136        sw_vcs_commit: 0_u32,
32137        name: [0_u8; 80usize],
32138        hw_version_major: 0_u8,
32139        hw_version_minor: 0_u8,
32140        hw_unique_id: [0_u8; 16usize],
32141        sw_version_major: 0_u8,
32142        sw_version_minor: 0_u8,
32143    };
32144    #[cfg(feature = "arbitrary")]
32145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32146        use arbitrary::{Arbitrary, Unstructured};
32147        let mut buf = [0u8; 1024];
32148        rng.fill_bytes(&mut buf);
32149        let mut unstructured = Unstructured::new(&buf);
32150        Self::arbitrary(&mut unstructured).unwrap_or_default()
32151    }
32152}
32153impl Default for UAVCAN_NODE_INFO_DATA {
32154    fn default() -> Self {
32155        Self::DEFAULT.clone()
32156    }
32157}
32158impl MessageData for UAVCAN_NODE_INFO_DATA {
32159    type Message = MavMessage;
32160    const ID: u32 = 311u32;
32161    const NAME: &'static str = "UAVCAN_NODE_INFO";
32162    const EXTRA_CRC: u8 = 95u8;
32163    const ENCODED_LEN: usize = 116usize;
32164    fn deser(
32165        _version: MavlinkVersion,
32166        __input: &[u8],
32167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32168        let avail_len = __input.len();
32169        let mut payload_buf = [0; Self::ENCODED_LEN];
32170        let mut buf = if avail_len < Self::ENCODED_LEN {
32171            payload_buf[0..avail_len].copy_from_slice(__input);
32172            Bytes::new(&payload_buf)
32173        } else {
32174            Bytes::new(__input)
32175        };
32176        let mut __struct = Self::default();
32177        __struct.time_usec = buf.get_u64_le();
32178        __struct.uptime_sec = buf.get_u32_le();
32179        __struct.sw_vcs_commit = buf.get_u32_le();
32180        for v in &mut __struct.name {
32181            let val = buf.get_u8();
32182            *v = val;
32183        }
32184        __struct.hw_version_major = buf.get_u8();
32185        __struct.hw_version_minor = buf.get_u8();
32186        for v in &mut __struct.hw_unique_id {
32187            let val = buf.get_u8();
32188            *v = val;
32189        }
32190        __struct.sw_version_major = buf.get_u8();
32191        __struct.sw_version_minor = buf.get_u8();
32192        Ok(__struct)
32193    }
32194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32195        let mut __tmp = BytesMut::new(bytes);
32196        #[allow(clippy::absurd_extreme_comparisons)]
32197        #[allow(unused_comparisons)]
32198        if __tmp.remaining() < Self::ENCODED_LEN {
32199            panic!(
32200                "buffer is too small (need {} bytes, but got {})",
32201                Self::ENCODED_LEN,
32202                __tmp.remaining(),
32203            )
32204        }
32205        __tmp.put_u64_le(self.time_usec);
32206        __tmp.put_u32_le(self.uptime_sec);
32207        __tmp.put_u32_le(self.sw_vcs_commit);
32208        for val in &self.name {
32209            __tmp.put_u8(*val);
32210        }
32211        __tmp.put_u8(self.hw_version_major);
32212        __tmp.put_u8(self.hw_version_minor);
32213        for val in &self.hw_unique_id {
32214            __tmp.put_u8(*val);
32215        }
32216        __tmp.put_u8(self.sw_version_major);
32217        __tmp.put_u8(self.sw_version_minor);
32218        if matches!(version, MavlinkVersion::V2) {
32219            let len = __tmp.len();
32220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32221        } else {
32222            __tmp.len()
32223        }
32224    }
32225}
32226#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32227#[doc = ""]
32228#[doc = "ID: 310"]
32229#[derive(Debug, Clone, PartialEq)]
32230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32232#[cfg_attr(feature = "ts", derive(TS))]
32233#[cfg_attr(feature = "ts", ts(export))]
32234pub struct UAVCAN_NODE_STATUS_DATA {
32235    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32236    pub time_usec: u64,
32237    #[doc = "Time since the start-up of the node."]
32238    pub uptime_sec: u32,
32239    #[doc = "Vendor-specific status information."]
32240    pub vendor_specific_status_code: u16,
32241    #[doc = "Generalized node health status."]
32242    pub health: UavcanNodeHealth,
32243    #[doc = "Generalized operating mode."]
32244    pub mode: UavcanNodeMode,
32245    #[doc = "Not used currently."]
32246    pub sub_mode: u8,
32247}
32248impl UAVCAN_NODE_STATUS_DATA {
32249    pub const ENCODED_LEN: usize = 17usize;
32250    pub const DEFAULT: Self = Self {
32251        time_usec: 0_u64,
32252        uptime_sec: 0_u32,
32253        vendor_specific_status_code: 0_u16,
32254        health: UavcanNodeHealth::DEFAULT,
32255        mode: UavcanNodeMode::DEFAULT,
32256        sub_mode: 0_u8,
32257    };
32258    #[cfg(feature = "arbitrary")]
32259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32260        use arbitrary::{Arbitrary, Unstructured};
32261        let mut buf = [0u8; 1024];
32262        rng.fill_bytes(&mut buf);
32263        let mut unstructured = Unstructured::new(&buf);
32264        Self::arbitrary(&mut unstructured).unwrap_or_default()
32265    }
32266}
32267impl Default for UAVCAN_NODE_STATUS_DATA {
32268    fn default() -> Self {
32269        Self::DEFAULT.clone()
32270    }
32271}
32272impl MessageData for UAVCAN_NODE_STATUS_DATA {
32273    type Message = MavMessage;
32274    const ID: u32 = 310u32;
32275    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32276    const EXTRA_CRC: u8 = 28u8;
32277    const ENCODED_LEN: usize = 17usize;
32278    fn deser(
32279        _version: MavlinkVersion,
32280        __input: &[u8],
32281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32282        let avail_len = __input.len();
32283        let mut payload_buf = [0; Self::ENCODED_LEN];
32284        let mut buf = if avail_len < Self::ENCODED_LEN {
32285            payload_buf[0..avail_len].copy_from_slice(__input);
32286            Bytes::new(&payload_buf)
32287        } else {
32288            Bytes::new(__input)
32289        };
32290        let mut __struct = Self::default();
32291        __struct.time_usec = buf.get_u64_le();
32292        __struct.uptime_sec = buf.get_u32_le();
32293        __struct.vendor_specific_status_code = buf.get_u16_le();
32294        let tmp = buf.get_u8();
32295        __struct.health =
32296            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32297                enum_type: "UavcanNodeHealth",
32298                value: tmp as u32,
32299            })?;
32300        let tmp = buf.get_u8();
32301        __struct.mode =
32302            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32303                enum_type: "UavcanNodeMode",
32304                value: tmp as u32,
32305            })?;
32306        __struct.sub_mode = buf.get_u8();
32307        Ok(__struct)
32308    }
32309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32310        let mut __tmp = BytesMut::new(bytes);
32311        #[allow(clippy::absurd_extreme_comparisons)]
32312        #[allow(unused_comparisons)]
32313        if __tmp.remaining() < Self::ENCODED_LEN {
32314            panic!(
32315                "buffer is too small (need {} bytes, but got {})",
32316                Self::ENCODED_LEN,
32317                __tmp.remaining(),
32318            )
32319        }
32320        __tmp.put_u64_le(self.time_usec);
32321        __tmp.put_u32_le(self.uptime_sec);
32322        __tmp.put_u16_le(self.vendor_specific_status_code);
32323        __tmp.put_u8(self.health as u8);
32324        __tmp.put_u8(self.mode as u8);
32325        __tmp.put_u8(self.sub_mode);
32326        if matches!(version, MavlinkVersion::V2) {
32327            let len = __tmp.len();
32328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32329        } else {
32330            __tmp.len()
32331        }
32332    }
32333}
32334#[doc = "The global position resulting from GPS and sensor fusion."]
32335#[doc = ""]
32336#[doc = "ID: 340"]
32337#[derive(Debug, Clone, PartialEq)]
32338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32340#[cfg_attr(feature = "ts", derive(TS))]
32341#[cfg_attr(feature = "ts", ts(export))]
32342pub struct UTM_GLOBAL_POSITION_DATA {
32343    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32344    pub time: u64,
32345    #[doc = "Latitude (WGS84)"]
32346    pub lat: i32,
32347    #[doc = "Longitude (WGS84)"]
32348    pub lon: i32,
32349    #[doc = "Altitude (WGS84)"]
32350    pub alt: i32,
32351    #[doc = "Altitude above ground"]
32352    pub relative_alt: i32,
32353    #[doc = "Next waypoint, latitude (WGS84)"]
32354    pub next_lat: i32,
32355    #[doc = "Next waypoint, longitude (WGS84)"]
32356    pub next_lon: i32,
32357    #[doc = "Next waypoint, altitude (WGS84)"]
32358    pub next_alt: i32,
32359    #[doc = "Ground X speed (latitude, positive north)"]
32360    pub vx: i16,
32361    #[doc = "Ground Y speed (longitude, positive east)"]
32362    pub vy: i16,
32363    #[doc = "Ground Z speed (altitude, positive down)"]
32364    pub vz: i16,
32365    #[doc = "Horizontal position uncertainty (standard deviation)"]
32366    pub h_acc: u16,
32367    #[doc = "Altitude uncertainty (standard deviation)"]
32368    pub v_acc: u16,
32369    #[doc = "Speed uncertainty (standard deviation)"]
32370    pub vel_acc: u16,
32371    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32372    pub update_rate: u16,
32373    #[doc = "Unique UAS ID."]
32374    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32375    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32376    pub uas_id: [u8; 18],
32377    #[doc = "Flight state"]
32378    pub flight_state: UtmFlightState,
32379    #[doc = "Bitwise OR combination of the data available flags."]
32380    pub flags: UtmDataAvailFlags,
32381}
32382impl UTM_GLOBAL_POSITION_DATA {
32383    pub const ENCODED_LEN: usize = 70usize;
32384    pub const DEFAULT: Self = Self {
32385        time: 0_u64,
32386        lat: 0_i32,
32387        lon: 0_i32,
32388        alt: 0_i32,
32389        relative_alt: 0_i32,
32390        next_lat: 0_i32,
32391        next_lon: 0_i32,
32392        next_alt: 0_i32,
32393        vx: 0_i16,
32394        vy: 0_i16,
32395        vz: 0_i16,
32396        h_acc: 0_u16,
32397        v_acc: 0_u16,
32398        vel_acc: 0_u16,
32399        update_rate: 0_u16,
32400        uas_id: [0_u8; 18usize],
32401        flight_state: UtmFlightState::DEFAULT,
32402        flags: UtmDataAvailFlags::DEFAULT,
32403    };
32404    #[cfg(feature = "arbitrary")]
32405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32406        use arbitrary::{Arbitrary, Unstructured};
32407        let mut buf = [0u8; 1024];
32408        rng.fill_bytes(&mut buf);
32409        let mut unstructured = Unstructured::new(&buf);
32410        Self::arbitrary(&mut unstructured).unwrap_or_default()
32411    }
32412}
32413impl Default for UTM_GLOBAL_POSITION_DATA {
32414    fn default() -> Self {
32415        Self::DEFAULT.clone()
32416    }
32417}
32418impl MessageData for UTM_GLOBAL_POSITION_DATA {
32419    type Message = MavMessage;
32420    const ID: u32 = 340u32;
32421    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32422    const EXTRA_CRC: u8 = 99u8;
32423    const ENCODED_LEN: usize = 70usize;
32424    fn deser(
32425        _version: MavlinkVersion,
32426        __input: &[u8],
32427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32428        let avail_len = __input.len();
32429        let mut payload_buf = [0; Self::ENCODED_LEN];
32430        let mut buf = if avail_len < Self::ENCODED_LEN {
32431            payload_buf[0..avail_len].copy_from_slice(__input);
32432            Bytes::new(&payload_buf)
32433        } else {
32434            Bytes::new(__input)
32435        };
32436        let mut __struct = Self::default();
32437        __struct.time = buf.get_u64_le();
32438        __struct.lat = buf.get_i32_le();
32439        __struct.lon = buf.get_i32_le();
32440        __struct.alt = buf.get_i32_le();
32441        __struct.relative_alt = buf.get_i32_le();
32442        __struct.next_lat = buf.get_i32_le();
32443        __struct.next_lon = buf.get_i32_le();
32444        __struct.next_alt = buf.get_i32_le();
32445        __struct.vx = buf.get_i16_le();
32446        __struct.vy = buf.get_i16_le();
32447        __struct.vz = buf.get_i16_le();
32448        __struct.h_acc = buf.get_u16_le();
32449        __struct.v_acc = buf.get_u16_le();
32450        __struct.vel_acc = buf.get_u16_le();
32451        __struct.update_rate = buf.get_u16_le();
32452        for v in &mut __struct.uas_id {
32453            let val = buf.get_u8();
32454            *v = val;
32455        }
32456        let tmp = buf.get_u8();
32457        __struct.flight_state =
32458            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32459                enum_type: "UtmFlightState",
32460                value: tmp as u32,
32461            })?;
32462        let tmp = buf.get_u8();
32463        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
32464            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32465                flag_type: "UtmDataAvailFlags",
32466                value: tmp as u32,
32467            })?;
32468        Ok(__struct)
32469    }
32470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32471        let mut __tmp = BytesMut::new(bytes);
32472        #[allow(clippy::absurd_extreme_comparisons)]
32473        #[allow(unused_comparisons)]
32474        if __tmp.remaining() < Self::ENCODED_LEN {
32475            panic!(
32476                "buffer is too small (need {} bytes, but got {})",
32477                Self::ENCODED_LEN,
32478                __tmp.remaining(),
32479            )
32480        }
32481        __tmp.put_u64_le(self.time);
32482        __tmp.put_i32_le(self.lat);
32483        __tmp.put_i32_le(self.lon);
32484        __tmp.put_i32_le(self.alt);
32485        __tmp.put_i32_le(self.relative_alt);
32486        __tmp.put_i32_le(self.next_lat);
32487        __tmp.put_i32_le(self.next_lon);
32488        __tmp.put_i32_le(self.next_alt);
32489        __tmp.put_i16_le(self.vx);
32490        __tmp.put_i16_le(self.vy);
32491        __tmp.put_i16_le(self.vz);
32492        __tmp.put_u16_le(self.h_acc);
32493        __tmp.put_u16_le(self.v_acc);
32494        __tmp.put_u16_le(self.vel_acc);
32495        __tmp.put_u16_le(self.update_rate);
32496        for val in &self.uas_id {
32497            __tmp.put_u8(*val);
32498        }
32499        __tmp.put_u8(self.flight_state as u8);
32500        __tmp.put_u8(self.flags.bits());
32501        if matches!(version, MavlinkVersion::V2) {
32502            let len = __tmp.len();
32503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32504        } else {
32505            __tmp.len()
32506        }
32507    }
32508}
32509#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32510#[doc = ""]
32511#[doc = "ID: 248"]
32512#[derive(Debug, Clone, PartialEq)]
32513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32515#[cfg_attr(feature = "ts", derive(TS))]
32516#[cfg_attr(feature = "ts", ts(export))]
32517pub struct V2_EXTENSION_DATA {
32518    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32519    pub message_type: u16,
32520    #[doc = "Network ID (0 for broadcast)"]
32521    pub target_network: u8,
32522    #[doc = "System ID (0 for broadcast)"]
32523    pub target_system: u8,
32524    #[doc = "Component ID (0 for broadcast)"]
32525    pub target_component: u8,
32526    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32528    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32529    pub payload: [u8; 249],
32530}
32531impl V2_EXTENSION_DATA {
32532    pub const ENCODED_LEN: usize = 254usize;
32533    pub const DEFAULT: Self = Self {
32534        message_type: 0_u16,
32535        target_network: 0_u8,
32536        target_system: 0_u8,
32537        target_component: 0_u8,
32538        payload: [0_u8; 249usize],
32539    };
32540    #[cfg(feature = "arbitrary")]
32541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32542        use arbitrary::{Arbitrary, Unstructured};
32543        let mut buf = [0u8; 1024];
32544        rng.fill_bytes(&mut buf);
32545        let mut unstructured = Unstructured::new(&buf);
32546        Self::arbitrary(&mut unstructured).unwrap_or_default()
32547    }
32548}
32549impl Default for V2_EXTENSION_DATA {
32550    fn default() -> Self {
32551        Self::DEFAULT.clone()
32552    }
32553}
32554impl MessageData for V2_EXTENSION_DATA {
32555    type Message = MavMessage;
32556    const ID: u32 = 248u32;
32557    const NAME: &'static str = "V2_EXTENSION";
32558    const EXTRA_CRC: u8 = 8u8;
32559    const ENCODED_LEN: usize = 254usize;
32560    fn deser(
32561        _version: MavlinkVersion,
32562        __input: &[u8],
32563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32564        let avail_len = __input.len();
32565        let mut payload_buf = [0; Self::ENCODED_LEN];
32566        let mut buf = if avail_len < Self::ENCODED_LEN {
32567            payload_buf[0..avail_len].copy_from_slice(__input);
32568            Bytes::new(&payload_buf)
32569        } else {
32570            Bytes::new(__input)
32571        };
32572        let mut __struct = Self::default();
32573        __struct.message_type = buf.get_u16_le();
32574        __struct.target_network = buf.get_u8();
32575        __struct.target_system = buf.get_u8();
32576        __struct.target_component = buf.get_u8();
32577        for v in &mut __struct.payload {
32578            let val = buf.get_u8();
32579            *v = val;
32580        }
32581        Ok(__struct)
32582    }
32583    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32584        let mut __tmp = BytesMut::new(bytes);
32585        #[allow(clippy::absurd_extreme_comparisons)]
32586        #[allow(unused_comparisons)]
32587        if __tmp.remaining() < Self::ENCODED_LEN {
32588            panic!(
32589                "buffer is too small (need {} bytes, but got {})",
32590                Self::ENCODED_LEN,
32591                __tmp.remaining(),
32592            )
32593        }
32594        __tmp.put_u16_le(self.message_type);
32595        __tmp.put_u8(self.target_network);
32596        __tmp.put_u8(self.target_system);
32597        __tmp.put_u8(self.target_component);
32598        for val in &self.payload {
32599            __tmp.put_u8(*val);
32600        }
32601        if matches!(version, MavlinkVersion::V2) {
32602            let len = __tmp.len();
32603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32604        } else {
32605            __tmp.len()
32606        }
32607    }
32608}
32609#[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
32610#[doc = ""]
32611#[doc = "ID: 355"]
32612#[derive(Debug, Clone, PartialEq)]
32613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32615#[cfg_attr(feature = "ts", derive(TS))]
32616#[cfg_attr(feature = "ts", ts(export))]
32617pub struct VELOCITY_LIMITS_DATA {
32618    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32619    pub horizontal_speed_limit: f32,
32620    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32621    pub vertical_speed_limit: f32,
32622    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: No limit applied"]
32623    pub yaw_rate_limit: f32,
32624}
32625impl VELOCITY_LIMITS_DATA {
32626    pub const ENCODED_LEN: usize = 12usize;
32627    pub const DEFAULT: Self = Self {
32628        horizontal_speed_limit: 0.0_f32,
32629        vertical_speed_limit: 0.0_f32,
32630        yaw_rate_limit: 0.0_f32,
32631    };
32632    #[cfg(feature = "arbitrary")]
32633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32634        use arbitrary::{Arbitrary, Unstructured};
32635        let mut buf = [0u8; 1024];
32636        rng.fill_bytes(&mut buf);
32637        let mut unstructured = Unstructured::new(&buf);
32638        Self::arbitrary(&mut unstructured).unwrap_or_default()
32639    }
32640}
32641impl Default for VELOCITY_LIMITS_DATA {
32642    fn default() -> Self {
32643        Self::DEFAULT.clone()
32644    }
32645}
32646impl MessageData for VELOCITY_LIMITS_DATA {
32647    type Message = MavMessage;
32648    const ID: u32 = 355u32;
32649    const NAME: &'static str = "VELOCITY_LIMITS";
32650    const EXTRA_CRC: u8 = 6u8;
32651    const ENCODED_LEN: usize = 12usize;
32652    fn deser(
32653        _version: MavlinkVersion,
32654        __input: &[u8],
32655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32656        let avail_len = __input.len();
32657        let mut payload_buf = [0; Self::ENCODED_LEN];
32658        let mut buf = if avail_len < Self::ENCODED_LEN {
32659            payload_buf[0..avail_len].copy_from_slice(__input);
32660            Bytes::new(&payload_buf)
32661        } else {
32662            Bytes::new(__input)
32663        };
32664        let mut __struct = Self::default();
32665        __struct.horizontal_speed_limit = buf.get_f32_le();
32666        __struct.vertical_speed_limit = buf.get_f32_le();
32667        __struct.yaw_rate_limit = buf.get_f32_le();
32668        Ok(__struct)
32669    }
32670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32671        let mut __tmp = BytesMut::new(bytes);
32672        #[allow(clippy::absurd_extreme_comparisons)]
32673        #[allow(unused_comparisons)]
32674        if __tmp.remaining() < Self::ENCODED_LEN {
32675            panic!(
32676                "buffer is too small (need {} bytes, but got {})",
32677                Self::ENCODED_LEN,
32678                __tmp.remaining(),
32679            )
32680        }
32681        __tmp.put_f32_le(self.horizontal_speed_limit);
32682        __tmp.put_f32_le(self.vertical_speed_limit);
32683        __tmp.put_f32_le(self.yaw_rate_limit);
32684        if matches!(version, MavlinkVersion::V2) {
32685            let len = __tmp.len();
32686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32687        } else {
32688            __tmp.len()
32689        }
32690    }
32691}
32692#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32693#[doc = ""]
32694#[doc = "ID: 74"]
32695#[derive(Debug, Clone, PartialEq)]
32696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32698#[cfg_attr(feature = "ts", derive(TS))]
32699#[cfg_attr(feature = "ts", ts(export))]
32700pub struct VFR_HUD_DATA {
32701    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32702    pub airspeed: f32,
32703    #[doc = "Current ground speed."]
32704    pub groundspeed: f32,
32705    #[doc = "Current altitude (MSL)."]
32706    pub alt: f32,
32707    #[doc = "Current climb rate."]
32708    pub climb: f32,
32709    #[doc = "Current heading in compass units (0-360, 0=north)."]
32710    pub heading: i16,
32711    #[doc = "Current throttle setting (0 to 100)."]
32712    pub throttle: u16,
32713}
32714impl VFR_HUD_DATA {
32715    pub const ENCODED_LEN: usize = 20usize;
32716    pub const DEFAULT: Self = Self {
32717        airspeed: 0.0_f32,
32718        groundspeed: 0.0_f32,
32719        alt: 0.0_f32,
32720        climb: 0.0_f32,
32721        heading: 0_i16,
32722        throttle: 0_u16,
32723    };
32724    #[cfg(feature = "arbitrary")]
32725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32726        use arbitrary::{Arbitrary, Unstructured};
32727        let mut buf = [0u8; 1024];
32728        rng.fill_bytes(&mut buf);
32729        let mut unstructured = Unstructured::new(&buf);
32730        Self::arbitrary(&mut unstructured).unwrap_or_default()
32731    }
32732}
32733impl Default for VFR_HUD_DATA {
32734    fn default() -> Self {
32735        Self::DEFAULT.clone()
32736    }
32737}
32738impl MessageData for VFR_HUD_DATA {
32739    type Message = MavMessage;
32740    const ID: u32 = 74u32;
32741    const NAME: &'static str = "VFR_HUD";
32742    const EXTRA_CRC: u8 = 20u8;
32743    const ENCODED_LEN: usize = 20usize;
32744    fn deser(
32745        _version: MavlinkVersion,
32746        __input: &[u8],
32747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32748        let avail_len = __input.len();
32749        let mut payload_buf = [0; Self::ENCODED_LEN];
32750        let mut buf = if avail_len < Self::ENCODED_LEN {
32751            payload_buf[0..avail_len].copy_from_slice(__input);
32752            Bytes::new(&payload_buf)
32753        } else {
32754            Bytes::new(__input)
32755        };
32756        let mut __struct = Self::default();
32757        __struct.airspeed = buf.get_f32_le();
32758        __struct.groundspeed = buf.get_f32_le();
32759        __struct.alt = buf.get_f32_le();
32760        __struct.climb = buf.get_f32_le();
32761        __struct.heading = buf.get_i16_le();
32762        __struct.throttle = buf.get_u16_le();
32763        Ok(__struct)
32764    }
32765    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32766        let mut __tmp = BytesMut::new(bytes);
32767        #[allow(clippy::absurd_extreme_comparisons)]
32768        #[allow(unused_comparisons)]
32769        if __tmp.remaining() < Self::ENCODED_LEN {
32770            panic!(
32771                "buffer is too small (need {} bytes, but got {})",
32772                Self::ENCODED_LEN,
32773                __tmp.remaining(),
32774            )
32775        }
32776        __tmp.put_f32_le(self.airspeed);
32777        __tmp.put_f32_le(self.groundspeed);
32778        __tmp.put_f32_le(self.alt);
32779        __tmp.put_f32_le(self.climb);
32780        __tmp.put_i16_le(self.heading);
32781        __tmp.put_u16_le(self.throttle);
32782        if matches!(version, MavlinkVersion::V2) {
32783            let len = __tmp.len();
32784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32785        } else {
32786            __tmp.len()
32787        }
32788    }
32789}
32790#[doc = "Vibration levels and accelerometer clipping."]
32791#[doc = ""]
32792#[doc = "ID: 241"]
32793#[derive(Debug, Clone, PartialEq)]
32794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32796#[cfg_attr(feature = "ts", derive(TS))]
32797#[cfg_attr(feature = "ts", ts(export))]
32798pub struct VIBRATION_DATA {
32799    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32800    pub time_usec: u64,
32801    #[doc = "Vibration levels on X-axis"]
32802    pub vibration_x: f32,
32803    #[doc = "Vibration levels on Y-axis"]
32804    pub vibration_y: f32,
32805    #[doc = "Vibration levels on Z-axis"]
32806    pub vibration_z: f32,
32807    #[doc = "first accelerometer clipping count"]
32808    pub clipping_0: u32,
32809    #[doc = "second accelerometer clipping count"]
32810    pub clipping_1: u32,
32811    #[doc = "third accelerometer clipping count"]
32812    pub clipping_2: u32,
32813}
32814impl VIBRATION_DATA {
32815    pub const ENCODED_LEN: usize = 32usize;
32816    pub const DEFAULT: Self = Self {
32817        time_usec: 0_u64,
32818        vibration_x: 0.0_f32,
32819        vibration_y: 0.0_f32,
32820        vibration_z: 0.0_f32,
32821        clipping_0: 0_u32,
32822        clipping_1: 0_u32,
32823        clipping_2: 0_u32,
32824    };
32825    #[cfg(feature = "arbitrary")]
32826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32827        use arbitrary::{Arbitrary, Unstructured};
32828        let mut buf = [0u8; 1024];
32829        rng.fill_bytes(&mut buf);
32830        let mut unstructured = Unstructured::new(&buf);
32831        Self::arbitrary(&mut unstructured).unwrap_or_default()
32832    }
32833}
32834impl Default for VIBRATION_DATA {
32835    fn default() -> Self {
32836        Self::DEFAULT.clone()
32837    }
32838}
32839impl MessageData for VIBRATION_DATA {
32840    type Message = MavMessage;
32841    const ID: u32 = 241u32;
32842    const NAME: &'static str = "VIBRATION";
32843    const EXTRA_CRC: u8 = 90u8;
32844    const ENCODED_LEN: usize = 32usize;
32845    fn deser(
32846        _version: MavlinkVersion,
32847        __input: &[u8],
32848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32849        let avail_len = __input.len();
32850        let mut payload_buf = [0; Self::ENCODED_LEN];
32851        let mut buf = if avail_len < Self::ENCODED_LEN {
32852            payload_buf[0..avail_len].copy_from_slice(__input);
32853            Bytes::new(&payload_buf)
32854        } else {
32855            Bytes::new(__input)
32856        };
32857        let mut __struct = Self::default();
32858        __struct.time_usec = buf.get_u64_le();
32859        __struct.vibration_x = buf.get_f32_le();
32860        __struct.vibration_y = buf.get_f32_le();
32861        __struct.vibration_z = buf.get_f32_le();
32862        __struct.clipping_0 = buf.get_u32_le();
32863        __struct.clipping_1 = buf.get_u32_le();
32864        __struct.clipping_2 = buf.get_u32_le();
32865        Ok(__struct)
32866    }
32867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32868        let mut __tmp = BytesMut::new(bytes);
32869        #[allow(clippy::absurd_extreme_comparisons)]
32870        #[allow(unused_comparisons)]
32871        if __tmp.remaining() < Self::ENCODED_LEN {
32872            panic!(
32873                "buffer is too small (need {} bytes, but got {})",
32874                Self::ENCODED_LEN,
32875                __tmp.remaining(),
32876            )
32877        }
32878        __tmp.put_u64_le(self.time_usec);
32879        __tmp.put_f32_le(self.vibration_x);
32880        __tmp.put_f32_le(self.vibration_y);
32881        __tmp.put_f32_le(self.vibration_z);
32882        __tmp.put_u32_le(self.clipping_0);
32883        __tmp.put_u32_le(self.clipping_1);
32884        __tmp.put_u32_le(self.clipping_2);
32885        if matches!(version, MavlinkVersion::V2) {
32886            let len = __tmp.len();
32887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32888        } else {
32889            __tmp.len()
32890        }
32891    }
32892}
32893#[doc = "Global position estimate from a Vicon motion system source."]
32894#[doc = ""]
32895#[doc = "ID: 104"]
32896#[derive(Debug, Clone, PartialEq)]
32897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32899#[cfg_attr(feature = "ts", derive(TS))]
32900#[cfg_attr(feature = "ts", ts(export))]
32901pub struct VICON_POSITION_ESTIMATE_DATA {
32902    #[doc = "Timestamp (UNIX time or time since system boot)"]
32903    pub usec: u64,
32904    #[doc = "Global X position"]
32905    pub x: f32,
32906    #[doc = "Global Y position"]
32907    pub y: f32,
32908    #[doc = "Global Z position"]
32909    pub z: f32,
32910    #[doc = "Roll angle"]
32911    pub roll: f32,
32912    #[doc = "Pitch angle"]
32913    pub pitch: f32,
32914    #[doc = "Yaw angle"]
32915    pub yaw: f32,
32916    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32917    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32919    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32920    pub covariance: [f32; 21],
32921}
32922impl VICON_POSITION_ESTIMATE_DATA {
32923    pub const ENCODED_LEN: usize = 116usize;
32924    pub const DEFAULT: Self = Self {
32925        usec: 0_u64,
32926        x: 0.0_f32,
32927        y: 0.0_f32,
32928        z: 0.0_f32,
32929        roll: 0.0_f32,
32930        pitch: 0.0_f32,
32931        yaw: 0.0_f32,
32932        covariance: [0.0_f32; 21usize],
32933    };
32934    #[cfg(feature = "arbitrary")]
32935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32936        use arbitrary::{Arbitrary, Unstructured};
32937        let mut buf = [0u8; 1024];
32938        rng.fill_bytes(&mut buf);
32939        let mut unstructured = Unstructured::new(&buf);
32940        Self::arbitrary(&mut unstructured).unwrap_or_default()
32941    }
32942}
32943impl Default for VICON_POSITION_ESTIMATE_DATA {
32944    fn default() -> Self {
32945        Self::DEFAULT.clone()
32946    }
32947}
32948impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32949    type Message = MavMessage;
32950    const ID: u32 = 104u32;
32951    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32952    const EXTRA_CRC: u8 = 56u8;
32953    const ENCODED_LEN: usize = 116usize;
32954    fn deser(
32955        _version: MavlinkVersion,
32956        __input: &[u8],
32957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32958        let avail_len = __input.len();
32959        let mut payload_buf = [0; Self::ENCODED_LEN];
32960        let mut buf = if avail_len < Self::ENCODED_LEN {
32961            payload_buf[0..avail_len].copy_from_slice(__input);
32962            Bytes::new(&payload_buf)
32963        } else {
32964            Bytes::new(__input)
32965        };
32966        let mut __struct = Self::default();
32967        __struct.usec = buf.get_u64_le();
32968        __struct.x = buf.get_f32_le();
32969        __struct.y = buf.get_f32_le();
32970        __struct.z = buf.get_f32_le();
32971        __struct.roll = buf.get_f32_le();
32972        __struct.pitch = buf.get_f32_le();
32973        __struct.yaw = buf.get_f32_le();
32974        for v in &mut __struct.covariance {
32975            let val = buf.get_f32_le();
32976            *v = val;
32977        }
32978        Ok(__struct)
32979    }
32980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32981        let mut __tmp = BytesMut::new(bytes);
32982        #[allow(clippy::absurd_extreme_comparisons)]
32983        #[allow(unused_comparisons)]
32984        if __tmp.remaining() < Self::ENCODED_LEN {
32985            panic!(
32986                "buffer is too small (need {} bytes, but got {})",
32987                Self::ENCODED_LEN,
32988                __tmp.remaining(),
32989            )
32990        }
32991        __tmp.put_u64_le(self.usec);
32992        __tmp.put_f32_le(self.x);
32993        __tmp.put_f32_le(self.y);
32994        __tmp.put_f32_le(self.z);
32995        __tmp.put_f32_le(self.roll);
32996        __tmp.put_f32_le(self.pitch);
32997        __tmp.put_f32_le(self.yaw);
32998        if matches!(version, MavlinkVersion::V2) {
32999            for val in &self.covariance {
33000                __tmp.put_f32_le(*val);
33001            }
33002            let len = __tmp.len();
33003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33004        } else {
33005            __tmp.len()
33006        }
33007    }
33008}
33009#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33010#[doc = ""]
33011#[doc = "ID: 269"]
33012#[derive(Debug, Clone, PartialEq)]
33013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33015#[cfg_attr(feature = "ts", derive(TS))]
33016#[cfg_attr(feature = "ts", ts(export))]
33017pub struct VIDEO_STREAM_INFORMATION_DATA {
33018    #[doc = "Frame rate."]
33019    pub framerate: f32,
33020    #[doc = "Bit rate."]
33021    pub bitrate: u32,
33022    #[doc = "Bitmap of stream status flags."]
33023    pub flags: VideoStreamStatusFlags,
33024    #[doc = "Horizontal resolution."]
33025    pub resolution_h: u16,
33026    #[doc = "Vertical resolution."]
33027    pub resolution_v: u16,
33028    #[doc = "Video image rotation clockwise."]
33029    pub rotation: u16,
33030    #[doc = "Horizontal Field of view."]
33031    pub hfov: u16,
33032    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33033    pub stream_id: u8,
33034    #[doc = "Number of streams available."]
33035    pub count: u8,
33036    #[doc = "Type of stream."]
33037    pub mavtype: VideoStreamType,
33038    #[doc = "Stream name."]
33039    #[cfg_attr(
33040        feature = "serde",
33041        serde(
33042            serialize_with = "crate::nulstr::serialize::<_, 32>",
33043            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
33044        )
33045    )]
33046    #[cfg_attr(feature = "ts", ts(type = "string"))]
33047    pub name: [u8; 32],
33048    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33049    #[cfg_attr(
33050        feature = "serde",
33051        serde(
33052            serialize_with = "crate::nulstr::serialize::<_, 160>",
33053            deserialize_with = "crate::nulstr::deserialize::<_, 160>"
33054        )
33055    )]
33056    #[cfg_attr(feature = "ts", ts(type = "string"))]
33057    pub uri: [u8; 160],
33058    #[doc = "Encoding of stream."]
33059    #[cfg_attr(feature = "serde", serde(default))]
33060    pub encoding: VideoStreamEncoding,
33061    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33062    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33063    pub camera_device_id: u8,
33064}
33065impl VIDEO_STREAM_INFORMATION_DATA {
33066    pub const ENCODED_LEN: usize = 215usize;
33067    pub const DEFAULT: Self = Self {
33068        framerate: 0.0_f32,
33069        bitrate: 0_u32,
33070        flags: VideoStreamStatusFlags::DEFAULT,
33071        resolution_h: 0_u16,
33072        resolution_v: 0_u16,
33073        rotation: 0_u16,
33074        hfov: 0_u16,
33075        stream_id: 0_u8,
33076        count: 0_u8,
33077        mavtype: VideoStreamType::DEFAULT,
33078        name: [0_u8; 32usize],
33079        uri: [0_u8; 160usize],
33080        encoding: VideoStreamEncoding::DEFAULT,
33081        camera_device_id: 0_u8,
33082    };
33083    #[cfg(feature = "arbitrary")]
33084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33085        use arbitrary::{Arbitrary, Unstructured};
33086        let mut buf = [0u8; 1024];
33087        rng.fill_bytes(&mut buf);
33088        let mut unstructured = Unstructured::new(&buf);
33089        Self::arbitrary(&mut unstructured).unwrap_or_default()
33090    }
33091}
33092impl Default for VIDEO_STREAM_INFORMATION_DATA {
33093    fn default() -> Self {
33094        Self::DEFAULT.clone()
33095    }
33096}
33097impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33098    type Message = MavMessage;
33099    const ID: u32 = 269u32;
33100    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33101    const EXTRA_CRC: u8 = 109u8;
33102    const ENCODED_LEN: usize = 215usize;
33103    fn deser(
33104        _version: MavlinkVersion,
33105        __input: &[u8],
33106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33107        let avail_len = __input.len();
33108        let mut payload_buf = [0; Self::ENCODED_LEN];
33109        let mut buf = if avail_len < Self::ENCODED_LEN {
33110            payload_buf[0..avail_len].copy_from_slice(__input);
33111            Bytes::new(&payload_buf)
33112        } else {
33113            Bytes::new(__input)
33114        };
33115        let mut __struct = Self::default();
33116        __struct.framerate = buf.get_f32_le();
33117        __struct.bitrate = buf.get_u32_le();
33118        let tmp = buf.get_u16_le();
33119        __struct.flags = VideoStreamStatusFlags::from_bits(
33120            tmp & VideoStreamStatusFlags::all().bits(),
33121        )
33122        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33123            flag_type: "VideoStreamStatusFlags",
33124            value: tmp as u32,
33125        })?;
33126        __struct.resolution_h = buf.get_u16_le();
33127        __struct.resolution_v = buf.get_u16_le();
33128        __struct.rotation = buf.get_u16_le();
33129        __struct.hfov = buf.get_u16_le();
33130        __struct.stream_id = buf.get_u8();
33131        __struct.count = buf.get_u8();
33132        let tmp = buf.get_u8();
33133        __struct.mavtype =
33134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33135                enum_type: "VideoStreamType",
33136                value: tmp as u32,
33137            })?;
33138        for v in &mut __struct.name {
33139            let val = buf.get_u8();
33140            *v = val;
33141        }
33142        for v in &mut __struct.uri {
33143            let val = buf.get_u8();
33144            *v = val;
33145        }
33146        let tmp = buf.get_u8();
33147        __struct.encoding =
33148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33149                enum_type: "VideoStreamEncoding",
33150                value: tmp as u32,
33151            })?;
33152        __struct.camera_device_id = buf.get_u8();
33153        Ok(__struct)
33154    }
33155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33156        let mut __tmp = BytesMut::new(bytes);
33157        #[allow(clippy::absurd_extreme_comparisons)]
33158        #[allow(unused_comparisons)]
33159        if __tmp.remaining() < Self::ENCODED_LEN {
33160            panic!(
33161                "buffer is too small (need {} bytes, but got {})",
33162                Self::ENCODED_LEN,
33163                __tmp.remaining(),
33164            )
33165        }
33166        __tmp.put_f32_le(self.framerate);
33167        __tmp.put_u32_le(self.bitrate);
33168        __tmp.put_u16_le(self.flags.bits());
33169        __tmp.put_u16_le(self.resolution_h);
33170        __tmp.put_u16_le(self.resolution_v);
33171        __tmp.put_u16_le(self.rotation);
33172        __tmp.put_u16_le(self.hfov);
33173        __tmp.put_u8(self.stream_id);
33174        __tmp.put_u8(self.count);
33175        __tmp.put_u8(self.mavtype as u8);
33176        for val in &self.name {
33177            __tmp.put_u8(*val);
33178        }
33179        for val in &self.uri {
33180            __tmp.put_u8(*val);
33181        }
33182        if matches!(version, MavlinkVersion::V2) {
33183            __tmp.put_u8(self.encoding as u8);
33184            __tmp.put_u8(self.camera_device_id);
33185            let len = __tmp.len();
33186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33187        } else {
33188            __tmp.len()
33189        }
33190    }
33191}
33192#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33193#[doc = ""]
33194#[doc = "ID: 270"]
33195#[derive(Debug, Clone, PartialEq)]
33196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33198#[cfg_attr(feature = "ts", derive(TS))]
33199#[cfg_attr(feature = "ts", ts(export))]
33200pub struct VIDEO_STREAM_STATUS_DATA {
33201    #[doc = "Frame rate"]
33202    pub framerate: f32,
33203    #[doc = "Bit rate"]
33204    pub bitrate: u32,
33205    #[doc = "Bitmap of stream status flags"]
33206    pub flags: VideoStreamStatusFlags,
33207    #[doc = "Horizontal resolution"]
33208    pub resolution_h: u16,
33209    #[doc = "Vertical resolution"]
33210    pub resolution_v: u16,
33211    #[doc = "Video image rotation clockwise"]
33212    pub rotation: u16,
33213    #[doc = "Horizontal Field of view"]
33214    pub hfov: u16,
33215    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33216    pub stream_id: u8,
33217    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33219    pub camera_device_id: u8,
33220}
33221impl VIDEO_STREAM_STATUS_DATA {
33222    pub const ENCODED_LEN: usize = 20usize;
33223    pub const DEFAULT: Self = Self {
33224        framerate: 0.0_f32,
33225        bitrate: 0_u32,
33226        flags: VideoStreamStatusFlags::DEFAULT,
33227        resolution_h: 0_u16,
33228        resolution_v: 0_u16,
33229        rotation: 0_u16,
33230        hfov: 0_u16,
33231        stream_id: 0_u8,
33232        camera_device_id: 0_u8,
33233    };
33234    #[cfg(feature = "arbitrary")]
33235    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33236        use arbitrary::{Arbitrary, Unstructured};
33237        let mut buf = [0u8; 1024];
33238        rng.fill_bytes(&mut buf);
33239        let mut unstructured = Unstructured::new(&buf);
33240        Self::arbitrary(&mut unstructured).unwrap_or_default()
33241    }
33242}
33243impl Default for VIDEO_STREAM_STATUS_DATA {
33244    fn default() -> Self {
33245        Self::DEFAULT.clone()
33246    }
33247}
33248impl MessageData for VIDEO_STREAM_STATUS_DATA {
33249    type Message = MavMessage;
33250    const ID: u32 = 270u32;
33251    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33252    const EXTRA_CRC: u8 = 59u8;
33253    const ENCODED_LEN: usize = 20usize;
33254    fn deser(
33255        _version: MavlinkVersion,
33256        __input: &[u8],
33257    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33258        let avail_len = __input.len();
33259        let mut payload_buf = [0; Self::ENCODED_LEN];
33260        let mut buf = if avail_len < Self::ENCODED_LEN {
33261            payload_buf[0..avail_len].copy_from_slice(__input);
33262            Bytes::new(&payload_buf)
33263        } else {
33264            Bytes::new(__input)
33265        };
33266        let mut __struct = Self::default();
33267        __struct.framerate = buf.get_f32_le();
33268        __struct.bitrate = buf.get_u32_le();
33269        let tmp = buf.get_u16_le();
33270        __struct.flags = VideoStreamStatusFlags::from_bits(
33271            tmp & VideoStreamStatusFlags::all().bits(),
33272        )
33273        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33274            flag_type: "VideoStreamStatusFlags",
33275            value: tmp as u32,
33276        })?;
33277        __struct.resolution_h = buf.get_u16_le();
33278        __struct.resolution_v = buf.get_u16_le();
33279        __struct.rotation = buf.get_u16_le();
33280        __struct.hfov = buf.get_u16_le();
33281        __struct.stream_id = buf.get_u8();
33282        __struct.camera_device_id = buf.get_u8();
33283        Ok(__struct)
33284    }
33285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33286        let mut __tmp = BytesMut::new(bytes);
33287        #[allow(clippy::absurd_extreme_comparisons)]
33288        #[allow(unused_comparisons)]
33289        if __tmp.remaining() < Self::ENCODED_LEN {
33290            panic!(
33291                "buffer is too small (need {} bytes, but got {})",
33292                Self::ENCODED_LEN,
33293                __tmp.remaining(),
33294            )
33295        }
33296        __tmp.put_f32_le(self.framerate);
33297        __tmp.put_u32_le(self.bitrate);
33298        __tmp.put_u16_le(self.flags.bits());
33299        __tmp.put_u16_le(self.resolution_h);
33300        __tmp.put_u16_le(self.resolution_v);
33301        __tmp.put_u16_le(self.rotation);
33302        __tmp.put_u16_le(self.hfov);
33303        __tmp.put_u8(self.stream_id);
33304        if matches!(version, MavlinkVersion::V2) {
33305            __tmp.put_u8(self.camera_device_id);
33306            let len = __tmp.len();
33307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33308        } else {
33309            __tmp.len()
33310        }
33311    }
33312}
33313#[doc = "Local position/attitude estimate from a vision source."]
33314#[doc = ""]
33315#[doc = "ID: 102"]
33316#[derive(Debug, Clone, PartialEq)]
33317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33319#[cfg_attr(feature = "ts", derive(TS))]
33320#[cfg_attr(feature = "ts", ts(export))]
33321pub struct VISION_POSITION_ESTIMATE_DATA {
33322    #[doc = "Timestamp (UNIX time or time since system boot)"]
33323    pub usec: u64,
33324    #[doc = "Local X position"]
33325    pub x: f32,
33326    #[doc = "Local Y position"]
33327    pub y: f32,
33328    #[doc = "Local Z position"]
33329    pub z: f32,
33330    #[doc = "Roll angle"]
33331    pub roll: f32,
33332    #[doc = "Pitch angle"]
33333    pub pitch: f32,
33334    #[doc = "Yaw angle"]
33335    pub yaw: f32,
33336    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33340    pub covariance: [f32; 21],
33341    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33343    pub reset_counter: u8,
33344}
33345impl VISION_POSITION_ESTIMATE_DATA {
33346    pub const ENCODED_LEN: usize = 117usize;
33347    pub const DEFAULT: Self = Self {
33348        usec: 0_u64,
33349        x: 0.0_f32,
33350        y: 0.0_f32,
33351        z: 0.0_f32,
33352        roll: 0.0_f32,
33353        pitch: 0.0_f32,
33354        yaw: 0.0_f32,
33355        covariance: [0.0_f32; 21usize],
33356        reset_counter: 0_u8,
33357    };
33358    #[cfg(feature = "arbitrary")]
33359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33360        use arbitrary::{Arbitrary, Unstructured};
33361        let mut buf = [0u8; 1024];
33362        rng.fill_bytes(&mut buf);
33363        let mut unstructured = Unstructured::new(&buf);
33364        Self::arbitrary(&mut unstructured).unwrap_or_default()
33365    }
33366}
33367impl Default for VISION_POSITION_ESTIMATE_DATA {
33368    fn default() -> Self {
33369        Self::DEFAULT.clone()
33370    }
33371}
33372impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33373    type Message = MavMessage;
33374    const ID: u32 = 102u32;
33375    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33376    const EXTRA_CRC: u8 = 158u8;
33377    const ENCODED_LEN: usize = 117usize;
33378    fn deser(
33379        _version: MavlinkVersion,
33380        __input: &[u8],
33381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33382        let avail_len = __input.len();
33383        let mut payload_buf = [0; Self::ENCODED_LEN];
33384        let mut buf = if avail_len < Self::ENCODED_LEN {
33385            payload_buf[0..avail_len].copy_from_slice(__input);
33386            Bytes::new(&payload_buf)
33387        } else {
33388            Bytes::new(__input)
33389        };
33390        let mut __struct = Self::default();
33391        __struct.usec = buf.get_u64_le();
33392        __struct.x = buf.get_f32_le();
33393        __struct.y = buf.get_f32_le();
33394        __struct.z = buf.get_f32_le();
33395        __struct.roll = buf.get_f32_le();
33396        __struct.pitch = buf.get_f32_le();
33397        __struct.yaw = buf.get_f32_le();
33398        for v in &mut __struct.covariance {
33399            let val = buf.get_f32_le();
33400            *v = val;
33401        }
33402        __struct.reset_counter = buf.get_u8();
33403        Ok(__struct)
33404    }
33405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33406        let mut __tmp = BytesMut::new(bytes);
33407        #[allow(clippy::absurd_extreme_comparisons)]
33408        #[allow(unused_comparisons)]
33409        if __tmp.remaining() < Self::ENCODED_LEN {
33410            panic!(
33411                "buffer is too small (need {} bytes, but got {})",
33412                Self::ENCODED_LEN,
33413                __tmp.remaining(),
33414            )
33415        }
33416        __tmp.put_u64_le(self.usec);
33417        __tmp.put_f32_le(self.x);
33418        __tmp.put_f32_le(self.y);
33419        __tmp.put_f32_le(self.z);
33420        __tmp.put_f32_le(self.roll);
33421        __tmp.put_f32_le(self.pitch);
33422        __tmp.put_f32_le(self.yaw);
33423        if matches!(version, MavlinkVersion::V2) {
33424            for val in &self.covariance {
33425                __tmp.put_f32_le(*val);
33426            }
33427            __tmp.put_u8(self.reset_counter);
33428            let len = __tmp.len();
33429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33430        } else {
33431            __tmp.len()
33432        }
33433    }
33434}
33435#[doc = "Speed estimate from a vision source."]
33436#[doc = ""]
33437#[doc = "ID: 103"]
33438#[derive(Debug, Clone, PartialEq)]
33439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33441#[cfg_attr(feature = "ts", derive(TS))]
33442#[cfg_attr(feature = "ts", ts(export))]
33443pub struct VISION_SPEED_ESTIMATE_DATA {
33444    #[doc = "Timestamp (UNIX time or time since system boot)"]
33445    pub usec: u64,
33446    #[doc = "Global X speed"]
33447    pub x: f32,
33448    #[doc = "Global Y speed"]
33449    pub y: f32,
33450    #[doc = "Global Z speed"]
33451    pub z: f32,
33452    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33453    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33454    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33455    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33456    pub covariance: [f32; 9],
33457    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33458    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33459    pub reset_counter: u8,
33460}
33461impl VISION_SPEED_ESTIMATE_DATA {
33462    pub const ENCODED_LEN: usize = 57usize;
33463    pub const DEFAULT: Self = Self {
33464        usec: 0_u64,
33465        x: 0.0_f32,
33466        y: 0.0_f32,
33467        z: 0.0_f32,
33468        covariance: [0.0_f32; 9usize],
33469        reset_counter: 0_u8,
33470    };
33471    #[cfg(feature = "arbitrary")]
33472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33473        use arbitrary::{Arbitrary, Unstructured};
33474        let mut buf = [0u8; 1024];
33475        rng.fill_bytes(&mut buf);
33476        let mut unstructured = Unstructured::new(&buf);
33477        Self::arbitrary(&mut unstructured).unwrap_or_default()
33478    }
33479}
33480impl Default for VISION_SPEED_ESTIMATE_DATA {
33481    fn default() -> Self {
33482        Self::DEFAULT.clone()
33483    }
33484}
33485impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33486    type Message = MavMessage;
33487    const ID: u32 = 103u32;
33488    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33489    const EXTRA_CRC: u8 = 208u8;
33490    const ENCODED_LEN: usize = 57usize;
33491    fn deser(
33492        _version: MavlinkVersion,
33493        __input: &[u8],
33494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33495        let avail_len = __input.len();
33496        let mut payload_buf = [0; Self::ENCODED_LEN];
33497        let mut buf = if avail_len < Self::ENCODED_LEN {
33498            payload_buf[0..avail_len].copy_from_slice(__input);
33499            Bytes::new(&payload_buf)
33500        } else {
33501            Bytes::new(__input)
33502        };
33503        let mut __struct = Self::default();
33504        __struct.usec = buf.get_u64_le();
33505        __struct.x = buf.get_f32_le();
33506        __struct.y = buf.get_f32_le();
33507        __struct.z = buf.get_f32_le();
33508        for v in &mut __struct.covariance {
33509            let val = buf.get_f32_le();
33510            *v = val;
33511        }
33512        __struct.reset_counter = buf.get_u8();
33513        Ok(__struct)
33514    }
33515    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33516        let mut __tmp = BytesMut::new(bytes);
33517        #[allow(clippy::absurd_extreme_comparisons)]
33518        #[allow(unused_comparisons)]
33519        if __tmp.remaining() < Self::ENCODED_LEN {
33520            panic!(
33521                "buffer is too small (need {} bytes, but got {})",
33522                Self::ENCODED_LEN,
33523                __tmp.remaining(),
33524            )
33525        }
33526        __tmp.put_u64_le(self.usec);
33527        __tmp.put_f32_le(self.x);
33528        __tmp.put_f32_le(self.y);
33529        __tmp.put_f32_le(self.z);
33530        if matches!(version, MavlinkVersion::V2) {
33531            for val in &self.covariance {
33532                __tmp.put_f32_le(*val);
33533            }
33534            __tmp.put_u8(self.reset_counter);
33535            let len = __tmp.len();
33536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33537        } else {
33538            __tmp.len()
33539        }
33540    }
33541}
33542#[doc = "Cumulative distance traveled for each reported wheel."]
33543#[doc = ""]
33544#[doc = "ID: 9000"]
33545#[derive(Debug, Clone, PartialEq)]
33546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33548#[cfg_attr(feature = "ts", derive(TS))]
33549#[cfg_attr(feature = "ts", ts(export))]
33550pub struct WHEEL_DISTANCE_DATA {
33551    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33552    pub time_usec: u64,
33553    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33554    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33555    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33556    pub distance: [f64; 16],
33557    #[doc = "Number of wheels reported."]
33558    pub count: u8,
33559}
33560impl WHEEL_DISTANCE_DATA {
33561    pub const ENCODED_LEN: usize = 137usize;
33562    pub const DEFAULT: Self = Self {
33563        time_usec: 0_u64,
33564        distance: [0.0_f64; 16usize],
33565        count: 0_u8,
33566    };
33567    #[cfg(feature = "arbitrary")]
33568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33569        use arbitrary::{Arbitrary, Unstructured};
33570        let mut buf = [0u8; 1024];
33571        rng.fill_bytes(&mut buf);
33572        let mut unstructured = Unstructured::new(&buf);
33573        Self::arbitrary(&mut unstructured).unwrap_or_default()
33574    }
33575}
33576impl Default for WHEEL_DISTANCE_DATA {
33577    fn default() -> Self {
33578        Self::DEFAULT.clone()
33579    }
33580}
33581impl MessageData for WHEEL_DISTANCE_DATA {
33582    type Message = MavMessage;
33583    const ID: u32 = 9000u32;
33584    const NAME: &'static str = "WHEEL_DISTANCE";
33585    const EXTRA_CRC: u8 = 113u8;
33586    const ENCODED_LEN: usize = 137usize;
33587    fn deser(
33588        _version: MavlinkVersion,
33589        __input: &[u8],
33590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33591        let avail_len = __input.len();
33592        let mut payload_buf = [0; Self::ENCODED_LEN];
33593        let mut buf = if avail_len < Self::ENCODED_LEN {
33594            payload_buf[0..avail_len].copy_from_slice(__input);
33595            Bytes::new(&payload_buf)
33596        } else {
33597            Bytes::new(__input)
33598        };
33599        let mut __struct = Self::default();
33600        __struct.time_usec = buf.get_u64_le();
33601        for v in &mut __struct.distance {
33602            let val = buf.get_f64_le();
33603            *v = val;
33604        }
33605        __struct.count = buf.get_u8();
33606        Ok(__struct)
33607    }
33608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33609        let mut __tmp = BytesMut::new(bytes);
33610        #[allow(clippy::absurd_extreme_comparisons)]
33611        #[allow(unused_comparisons)]
33612        if __tmp.remaining() < Self::ENCODED_LEN {
33613            panic!(
33614                "buffer is too small (need {} bytes, but got {})",
33615                Self::ENCODED_LEN,
33616                __tmp.remaining(),
33617            )
33618        }
33619        __tmp.put_u64_le(self.time_usec);
33620        for val in &self.distance {
33621            __tmp.put_f64_le(*val);
33622        }
33623        __tmp.put_u8(self.count);
33624        if matches!(version, MavlinkVersion::V2) {
33625            let len = __tmp.len();
33626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33627        } else {
33628            __tmp.len()
33629        }
33630    }
33631}
33632#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33633#[doc = ""]
33634#[doc = "ID: 299"]
33635#[derive(Debug, Clone, PartialEq)]
33636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33638#[cfg_attr(feature = "ts", derive(TS))]
33639#[cfg_attr(feature = "ts", ts(export))]
33640pub struct WIFI_CONFIG_AP_DATA {
33641    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33642    #[cfg_attr(
33643        feature = "serde",
33644        serde(
33645            serialize_with = "crate::nulstr::serialize::<_, 32>",
33646            deserialize_with = "crate::nulstr::deserialize::<_, 32>"
33647        )
33648    )]
33649    #[cfg_attr(feature = "ts", ts(type = "string"))]
33650    pub ssid: [u8; 32],
33651    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33652    #[cfg_attr(
33653        feature = "serde",
33654        serde(
33655            serialize_with = "crate::nulstr::serialize::<_, 64>",
33656            deserialize_with = "crate::nulstr::deserialize::<_, 64>"
33657        )
33658    )]
33659    #[cfg_attr(feature = "ts", ts(type = "string"))]
33660    pub password: [u8; 64],
33661    #[doc = "WiFi Mode."]
33662    #[cfg_attr(feature = "serde", serde(default))]
33663    pub mode: WifiConfigApMode,
33664    #[doc = "Message acceptance response (sent back to GS)."]
33665    #[cfg_attr(feature = "serde", serde(default))]
33666    pub response: WifiConfigApResponse,
33667}
33668impl WIFI_CONFIG_AP_DATA {
33669    pub const ENCODED_LEN: usize = 98usize;
33670    pub const DEFAULT: Self = Self {
33671        ssid: [0_u8; 32usize],
33672        password: [0_u8; 64usize],
33673        mode: WifiConfigApMode::DEFAULT,
33674        response: WifiConfigApResponse::DEFAULT,
33675    };
33676    #[cfg(feature = "arbitrary")]
33677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33678        use arbitrary::{Arbitrary, Unstructured};
33679        let mut buf = [0u8; 1024];
33680        rng.fill_bytes(&mut buf);
33681        let mut unstructured = Unstructured::new(&buf);
33682        Self::arbitrary(&mut unstructured).unwrap_or_default()
33683    }
33684}
33685impl Default for WIFI_CONFIG_AP_DATA {
33686    fn default() -> Self {
33687        Self::DEFAULT.clone()
33688    }
33689}
33690impl MessageData for WIFI_CONFIG_AP_DATA {
33691    type Message = MavMessage;
33692    const ID: u32 = 299u32;
33693    const NAME: &'static str = "WIFI_CONFIG_AP";
33694    const EXTRA_CRC: u8 = 19u8;
33695    const ENCODED_LEN: usize = 98usize;
33696    fn deser(
33697        _version: MavlinkVersion,
33698        __input: &[u8],
33699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33700        let avail_len = __input.len();
33701        let mut payload_buf = [0; Self::ENCODED_LEN];
33702        let mut buf = if avail_len < Self::ENCODED_LEN {
33703            payload_buf[0..avail_len].copy_from_slice(__input);
33704            Bytes::new(&payload_buf)
33705        } else {
33706            Bytes::new(__input)
33707        };
33708        let mut __struct = Self::default();
33709        for v in &mut __struct.ssid {
33710            let val = buf.get_u8();
33711            *v = val;
33712        }
33713        for v in &mut __struct.password {
33714            let val = buf.get_u8();
33715            *v = val;
33716        }
33717        let tmp = buf.get_i8();
33718        __struct.mode =
33719            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33720                enum_type: "WifiConfigApMode",
33721                value: tmp as u32,
33722            })?;
33723        let tmp = buf.get_i8();
33724        __struct.response =
33725            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33726                enum_type: "WifiConfigApResponse",
33727                value: tmp as u32,
33728            })?;
33729        Ok(__struct)
33730    }
33731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33732        let mut __tmp = BytesMut::new(bytes);
33733        #[allow(clippy::absurd_extreme_comparisons)]
33734        #[allow(unused_comparisons)]
33735        if __tmp.remaining() < Self::ENCODED_LEN {
33736            panic!(
33737                "buffer is too small (need {} bytes, but got {})",
33738                Self::ENCODED_LEN,
33739                __tmp.remaining(),
33740            )
33741        }
33742        for val in &self.ssid {
33743            __tmp.put_u8(*val);
33744        }
33745        for val in &self.password {
33746            __tmp.put_u8(*val);
33747        }
33748        if matches!(version, MavlinkVersion::V2) {
33749            __tmp.put_i8(self.mode as i8);
33750            __tmp.put_i8(self.response as i8);
33751            let len = __tmp.len();
33752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33753        } else {
33754            __tmp.len()
33755        }
33756    }
33757}
33758#[doc = "Winch status."]
33759#[doc = ""]
33760#[doc = "ID: 9005"]
33761#[derive(Debug, Clone, PartialEq)]
33762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33764#[cfg_attr(feature = "ts", derive(TS))]
33765#[cfg_attr(feature = "ts", ts(export))]
33766pub struct WINCH_STATUS_DATA {
33767    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33768    pub time_usec: u64,
33769    #[doc = "Length of line released. NaN if unknown"]
33770    pub line_length: f32,
33771    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33772    pub speed: f32,
33773    #[doc = "Tension on the line. NaN if unknown"]
33774    pub tension: f32,
33775    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33776    pub voltage: f32,
33777    #[doc = "Current draw from the winch. NaN if unknown"]
33778    pub current: f32,
33779    #[doc = "Status flags"]
33780    pub status: MavWinchStatusFlag,
33781    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33782    pub temperature: i16,
33783}
33784impl WINCH_STATUS_DATA {
33785    pub const ENCODED_LEN: usize = 34usize;
33786    pub const DEFAULT: Self = Self {
33787        time_usec: 0_u64,
33788        line_length: 0.0_f32,
33789        speed: 0.0_f32,
33790        tension: 0.0_f32,
33791        voltage: 0.0_f32,
33792        current: 0.0_f32,
33793        status: MavWinchStatusFlag::DEFAULT,
33794        temperature: 0_i16,
33795    };
33796    #[cfg(feature = "arbitrary")]
33797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33798        use arbitrary::{Arbitrary, Unstructured};
33799        let mut buf = [0u8; 1024];
33800        rng.fill_bytes(&mut buf);
33801        let mut unstructured = Unstructured::new(&buf);
33802        Self::arbitrary(&mut unstructured).unwrap_or_default()
33803    }
33804}
33805impl Default for WINCH_STATUS_DATA {
33806    fn default() -> Self {
33807        Self::DEFAULT.clone()
33808    }
33809}
33810impl MessageData for WINCH_STATUS_DATA {
33811    type Message = MavMessage;
33812    const ID: u32 = 9005u32;
33813    const NAME: &'static str = "WINCH_STATUS";
33814    const EXTRA_CRC: u8 = 117u8;
33815    const ENCODED_LEN: usize = 34usize;
33816    fn deser(
33817        _version: MavlinkVersion,
33818        __input: &[u8],
33819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33820        let avail_len = __input.len();
33821        let mut payload_buf = [0; Self::ENCODED_LEN];
33822        let mut buf = if avail_len < Self::ENCODED_LEN {
33823            payload_buf[0..avail_len].copy_from_slice(__input);
33824            Bytes::new(&payload_buf)
33825        } else {
33826            Bytes::new(__input)
33827        };
33828        let mut __struct = Self::default();
33829        __struct.time_usec = buf.get_u64_le();
33830        __struct.line_length = buf.get_f32_le();
33831        __struct.speed = buf.get_f32_le();
33832        __struct.tension = buf.get_f32_le();
33833        __struct.voltage = buf.get_f32_le();
33834        __struct.current = buf.get_f32_le();
33835        let tmp = buf.get_u32_le();
33836        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33837            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33838                flag_type: "MavWinchStatusFlag",
33839                value: tmp as u32,
33840            })?;
33841        __struct.temperature = buf.get_i16_le();
33842        Ok(__struct)
33843    }
33844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33845        let mut __tmp = BytesMut::new(bytes);
33846        #[allow(clippy::absurd_extreme_comparisons)]
33847        #[allow(unused_comparisons)]
33848        if __tmp.remaining() < Self::ENCODED_LEN {
33849            panic!(
33850                "buffer is too small (need {} bytes, but got {})",
33851                Self::ENCODED_LEN,
33852                __tmp.remaining(),
33853            )
33854        }
33855        __tmp.put_u64_le(self.time_usec);
33856        __tmp.put_f32_le(self.line_length);
33857        __tmp.put_f32_le(self.speed);
33858        __tmp.put_f32_le(self.tension);
33859        __tmp.put_f32_le(self.voltage);
33860        __tmp.put_f32_le(self.current);
33861        __tmp.put_u32_le(self.status.bits());
33862        __tmp.put_i16_le(self.temperature);
33863        if matches!(version, MavlinkVersion::V2) {
33864            let len = __tmp.len();
33865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33866        } else {
33867            __tmp.len()
33868        }
33869    }
33870}
33871#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33872#[doc = ""]
33873#[doc = "ID: 231"]
33874#[derive(Debug, Clone, PartialEq)]
33875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33877#[cfg_attr(feature = "ts", derive(TS))]
33878#[cfg_attr(feature = "ts", ts(export))]
33879pub struct WIND_COV_DATA {
33880    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33881    pub time_usec: u64,
33882    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33883    pub wind_x: f32,
33884    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33885    pub wind_y: f32,
33886    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33887    pub wind_z: f32,
33888    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33889    pub var_horiz: f32,
33890    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33891    pub var_vert: f32,
33892    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33893    pub wind_alt: f32,
33894    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33895    pub horiz_accuracy: f32,
33896    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33897    pub vert_accuracy: f32,
33898}
33899impl WIND_COV_DATA {
33900    pub const ENCODED_LEN: usize = 40usize;
33901    pub const DEFAULT: Self = Self {
33902        time_usec: 0_u64,
33903        wind_x: 0.0_f32,
33904        wind_y: 0.0_f32,
33905        wind_z: 0.0_f32,
33906        var_horiz: 0.0_f32,
33907        var_vert: 0.0_f32,
33908        wind_alt: 0.0_f32,
33909        horiz_accuracy: 0.0_f32,
33910        vert_accuracy: 0.0_f32,
33911    };
33912    #[cfg(feature = "arbitrary")]
33913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33914        use arbitrary::{Arbitrary, Unstructured};
33915        let mut buf = [0u8; 1024];
33916        rng.fill_bytes(&mut buf);
33917        let mut unstructured = Unstructured::new(&buf);
33918        Self::arbitrary(&mut unstructured).unwrap_or_default()
33919    }
33920}
33921impl Default for WIND_COV_DATA {
33922    fn default() -> Self {
33923        Self::DEFAULT.clone()
33924    }
33925}
33926impl MessageData for WIND_COV_DATA {
33927    type Message = MavMessage;
33928    const ID: u32 = 231u32;
33929    const NAME: &'static str = "WIND_COV";
33930    const EXTRA_CRC: u8 = 105u8;
33931    const ENCODED_LEN: usize = 40usize;
33932    fn deser(
33933        _version: MavlinkVersion,
33934        __input: &[u8],
33935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33936        let avail_len = __input.len();
33937        let mut payload_buf = [0; Self::ENCODED_LEN];
33938        let mut buf = if avail_len < Self::ENCODED_LEN {
33939            payload_buf[0..avail_len].copy_from_slice(__input);
33940            Bytes::new(&payload_buf)
33941        } else {
33942            Bytes::new(__input)
33943        };
33944        let mut __struct = Self::default();
33945        __struct.time_usec = buf.get_u64_le();
33946        __struct.wind_x = buf.get_f32_le();
33947        __struct.wind_y = buf.get_f32_le();
33948        __struct.wind_z = buf.get_f32_le();
33949        __struct.var_horiz = buf.get_f32_le();
33950        __struct.var_vert = buf.get_f32_le();
33951        __struct.wind_alt = buf.get_f32_le();
33952        __struct.horiz_accuracy = buf.get_f32_le();
33953        __struct.vert_accuracy = buf.get_f32_le();
33954        Ok(__struct)
33955    }
33956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33957        let mut __tmp = BytesMut::new(bytes);
33958        #[allow(clippy::absurd_extreme_comparisons)]
33959        #[allow(unused_comparisons)]
33960        if __tmp.remaining() < Self::ENCODED_LEN {
33961            panic!(
33962                "buffer is too small (need {} bytes, but got {})",
33963                Self::ENCODED_LEN,
33964                __tmp.remaining(),
33965            )
33966        }
33967        __tmp.put_u64_le(self.time_usec);
33968        __tmp.put_f32_le(self.wind_x);
33969        __tmp.put_f32_le(self.wind_y);
33970        __tmp.put_f32_le(self.wind_z);
33971        __tmp.put_f32_le(self.var_horiz);
33972        __tmp.put_f32_le(self.var_vert);
33973        __tmp.put_f32_le(self.wind_alt);
33974        __tmp.put_f32_le(self.horiz_accuracy);
33975        __tmp.put_f32_le(self.vert_accuracy);
33976        if matches!(version, MavlinkVersion::V2) {
33977            let len = __tmp.len();
33978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33979        } else {
33980            __tmp.len()
33981        }
33982    }
33983}
33984#[derive(Clone, PartialEq, Debug)]
33985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33986#[cfg_attr(feature = "serde", serde(tag = "type"))]
33987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33988#[cfg_attr(feature = "ts", derive(TS))]
33989#[cfg_attr(feature = "ts", ts(export))]
33990#[repr(u32)]
33991pub enum MavMessage {
33992    #[doc = "Set the vehicle attitude and body angular rates."]
33993    #[doc = ""]
33994    #[doc = "ID: 140"]
33995    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33996    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33997    #[doc = ""]
33998    #[doc = "ID: 375"]
33999    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34000    #[doc = "The location and information of an ADSB vehicle."]
34001    #[doc = ""]
34002    #[doc = "ID: 246"]
34003    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34004    #[doc = "Airspeed information from a sensor."]
34005    #[doc = ""]
34006    #[doc = "ID: 295"]
34007    AIRSPEED(AIRSPEED_DATA),
34008    #[doc = "The location and information of an AIS vessel."]
34009    #[doc = ""]
34010    #[doc = "ID: 301"]
34011    AIS_VESSEL(AIS_VESSEL_DATA),
34012    #[doc = "The current system altitude."]
34013    #[doc = ""]
34014    #[doc = "ID: 141"]
34015    ALTITUDE(ALTITUDE_DATA),
34016    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34017    #[doc = ""]
34018    #[doc = "ID: 30"]
34019    ATTITUDE(ATTITUDE_DATA),
34020    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34021    #[doc = ""]
34022    #[doc = "ID: 31"]
34023    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34024    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34025    #[doc = ""]
34026    #[doc = "ID: 61"]
34027    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34028    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34029    #[doc = ""]
34030    #[doc = "ID: 83"]
34031    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34032    #[doc = "Motion capture attitude and position."]
34033    #[doc = ""]
34034    #[doc = "ID: 138"]
34035    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34036    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34037    #[doc = ""]
34038    #[doc = "ID: 7"]
34039    AUTH_KEY(AUTH_KEY_DATA),
34040    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34041    #[doc = ""]
34042    #[doc = "ID: 286"]
34043    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34044    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34045    #[doc = ""]
34046    #[doc = "ID: 148"]
34047    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34048    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34049    #[doc = ""]
34050    #[doc = "ID: 435"]
34051    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34052    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34053    #[doc = ""]
34054    #[doc = "ID: 437"]
34055    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34056    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34057    #[doc = ""]
34058    #[doc = "ID: 372"]
34059    BATTERY_INFO(BATTERY_INFO_DATA),
34060    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34061    #[doc = ""]
34062    #[doc = "ID: 147"]
34063    BATTERY_STATUS(BATTERY_STATUS_DATA),
34064    #[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
34065    #[doc = ""]
34066    #[doc = "ID: 369"]
34067    BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA),
34068    #[doc = "Report button state change."]
34069    #[doc = ""]
34070    #[doc = "ID: 257"]
34071    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34072    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34073    #[doc = ""]
34074    #[doc = "ID: 262"]
34075    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34076    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34077    #[doc = ""]
34078    #[doc = "ID: 271"]
34079    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34080    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34081    #[doc = ""]
34082    #[doc = "ID: 263"]
34083    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34084    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34085    #[doc = ""]
34086    #[doc = "ID: 259"]
34087    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34088    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34089    #[doc = ""]
34090    #[doc = "ID: 260"]
34091    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34092    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34093    #[doc = ""]
34094    #[doc = "ID: 277"]
34095    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34096    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34097    #[doc = ""]
34098    #[doc = "ID: 276"]
34099    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34100    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34101    #[doc = ""]
34102    #[doc = "ID: 275"]
34103    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34104    #[doc = "Camera-IMU triggering and synchronisation message."]
34105    #[doc = ""]
34106    #[doc = "ID: 112"]
34107    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34108    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34109    #[doc = ""]
34110    #[doc = "ID: 387"]
34111    CANFD_FRAME(CANFD_FRAME_DATA),
34112    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34113    #[doc = ""]
34114    #[doc = "ID: 388"]
34115    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34116    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34117    #[doc = ""]
34118    #[doc = "ID: 386"]
34119    CAN_FRAME(CAN_FRAME_DATA),
34120    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34121    #[doc = ""]
34122    #[doc = "ID: 336"]
34123    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34124    #[doc = "Report current used cellular network status."]
34125    #[doc = ""]
34126    #[doc = "ID: 334"]
34127    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34128    #[doc = "Request to control this MAV."]
34129    #[doc = ""]
34130    #[doc = "ID: 5"]
34131    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34132    #[doc = "Accept / deny control of this MAV."]
34133    #[doc = ""]
34134    #[doc = "ID: 6"]
34135    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34136    #[doc = "Information about a potential collision."]
34137    #[doc = ""]
34138    #[doc = "ID: 247"]
34139    COLLISION(COLLISION_DATA),
34140    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34141    #[doc = ""]
34142    #[doc = "ID: 77"]
34143    COMMAND_ACK(COMMAND_ACK_DATA),
34144    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34145    #[doc = ""]
34146    #[doc = "ID: 80"]
34147    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34148    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34149    #[doc = ""]
34150    #[doc = "ID: 75"]
34151    COMMAND_INT(COMMAND_INT_DATA),
34152    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34153    #[doc = ""]
34154    #[doc = "ID: 76"]
34155    COMMAND_LONG(COMMAND_LONG_DATA),
34156    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34157    #[doc = ""]
34158    #[doc = "ID: 395"]
34159    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34160    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34161    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34162    #[doc = ""]
34163    #[doc = "ID: 396"]
34164    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34165    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34166    #[doc = ""]
34167    #[doc = "ID: 397"]
34168    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34169    #[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
34170    #[doc = ""]
34171    #[doc = "ID: 512"]
34172    CONTROL_STATUS(CONTROL_STATUS_DATA),
34173    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34174    #[doc = ""]
34175    #[doc = "ID: 146"]
34176    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34177    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34178    #[doc = ""]
34179    #[doc = "ID: 411"]
34180    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34181    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34182    #[doc = ""]
34183    #[doc = "ID: 436"]
34184    CURRENT_MODE(CURRENT_MODE_DATA),
34185    #[doc = "Data stream status information."]
34186    #[doc = ""]
34187    #[doc = "ID: 67"]
34188    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34189    DATA_STREAM(DATA_STREAM_DATA),
34190    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34191    #[doc = ""]
34192    #[doc = "ID: 130"]
34193    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34194    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34195    #[doc = ""]
34196    #[doc = "ID: 254"]
34197    DEBUG(DEBUG_DATA),
34198    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34199    #[doc = ""]
34200    #[doc = "ID: 350"]
34201    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34202    #[doc = "To debug something using a named 3D vector."]
34203    #[doc = ""]
34204    #[doc = "ID: 250"]
34205    DEBUG_VECT(DEBUG_VECT_DATA),
34206    #[doc = "Distance sensor information for an onboard rangefinder."]
34207    #[doc = ""]
34208    #[doc = "ID: 132"]
34209    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34210    #[doc = "EFI status output."]
34211    #[doc = ""]
34212    #[doc = "ID: 225"]
34213    EFI_STATUS(EFI_STATUS_DATA),
34214    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34215    #[doc = ""]
34216    #[doc = "ID: 131"]
34217    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34218    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34219    #[doc = ""]
34220    #[doc = "ID: 290"]
34221    ESC_INFO(ESC_INFO_DATA),
34222    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34223    #[doc = ""]
34224    #[doc = "ID: 291"]
34225    ESC_STATUS(ESC_STATUS_DATA),
34226    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34227    #[doc = ""]
34228    #[doc = "ID: 230"]
34229    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34230    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34231    #[doc = ""]
34232    #[doc = "ID: 410"]
34233    EVENT(EVENT_DATA),
34234    #[doc = "Provides state for additional features."]
34235    #[doc = ""]
34236    #[doc = "ID: 245"]
34237    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34238    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34239    #[doc = ""]
34240    #[doc = "ID: 162"]
34241    FENCE_STATUS(FENCE_STATUS_DATA),
34242    #[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
34243    #[doc = ""]
34244    #[doc = "ID: 361"]
34245    FIGURE_EIGHT_EXECUTION_STATUS(FIGURE_EIGHT_EXECUTION_STATUS_DATA),
34246    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34247    #[doc = ""]
34248    #[doc = "ID: 110"]
34249    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34250    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34251    #[doc = ""]
34252    #[doc = "ID: 264"]
34253    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34254    #[doc = "Current motion information from a designated system."]
34255    #[doc = ""]
34256    #[doc = "ID: 144"]
34257    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34258    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34259    #[doc = ""]
34260    #[doc = "ID: 371"]
34261    FUEL_STATUS(FUEL_STATUS_DATA),
34262    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34263    #[doc = ""]
34264    #[doc = "ID: 373"]
34265    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34266    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34267    #[doc = ""]
34268    #[doc = "ID: 285"]
34269    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34270    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34271    #[doc = ""]
34272    #[doc = "ID: 283"]
34273    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34274    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34275    #[doc = ""]
34276    #[doc = "ID: 284"]
34277    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34278    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34279    #[doc = ""]
34280    #[doc = "ID: 280"]
34281    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34282    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34283    #[doc = ""]
34284    #[doc = "ID: 282"]
34285    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34286    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34287    #[doc = ""]
34288    #[doc = "ID: 288"]
34289    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34290    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34291    #[doc = ""]
34292    #[doc = "ID: 287"]
34293    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34294    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34295    #[doc = ""]
34296    #[doc = "ID: 281"]
34297    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34298    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34299    #[doc = ""]
34300    #[doc = "ID: 33"]
34301    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34302    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34303    #[doc = ""]
34304    #[doc = "ID: 63"]
34305    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34306    #[doc = "Global position/attitude estimate from a vision source."]
34307    #[doc = ""]
34308    #[doc = "ID: 101"]
34309    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34310    #[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
34311    #[doc = ""]
34312    #[doc = "ID: 441"]
34313    GNSS_INTEGRITY(GNSS_INTEGRITY_DATA),
34314    #[doc = "Second GPS data."]
34315    #[doc = ""]
34316    #[doc = "ID: 124"]
34317    GPS2_RAW(GPS2_RAW_DATA),
34318    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34319    #[doc = ""]
34320    #[doc = "ID: 128"]
34321    GPS2_RTK(GPS2_RTK_DATA),
34322    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34323    #[doc = ""]
34324    #[doc = "ID: 49"]
34325    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34326    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34327    #[doc = ""]
34328    #[doc = "ID: 123"]
34329    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34330    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34331    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34332    #[doc = ""]
34333    #[doc = "ID: 232"]
34334    GPS_INPUT(GPS_INPUT_DATA),
34335    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34336    #[doc = ""]
34337    #[doc = "ID: 24"]
34338    GPS_RAW_INT(GPS_RAW_INT_DATA),
34339    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34340    #[doc = ""]
34341    #[doc = "ID: 233"]
34342    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34343    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34344    #[doc = ""]
34345    #[doc = "ID: 127"]
34346    GPS_RTK(GPS_RTK_DATA),
34347    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34348    #[doc = ""]
34349    #[doc = "ID: 25"]
34350    GPS_STATUS(GPS_STATUS_DATA),
34351    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
34352    #[doc = ""]
34353    #[doc = "ID: 415"]
34354    GROUP_END(GROUP_END_DATA),
34355    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
34356    #[doc = ""]
34357    #[doc = "ID: 414"]
34358    GROUP_START(GROUP_START_DATA),
34359    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34360    #[doc = ""]
34361    #[doc = "ID: 0"]
34362    HEARTBEAT(HEARTBEAT_DATA),
34363    #[doc = "The IMU readings in SI units in NED body frame."]
34364    #[doc = ""]
34365    #[doc = "ID: 105"]
34366    HIGHRES_IMU(HIGHRES_IMU_DATA),
34367    #[doc = "Message appropriate for high latency connections like Iridium."]
34368    #[doc = ""]
34369    #[doc = "ID: 234"]
34370    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34371    HIGH_LATENCY(HIGH_LATENCY_DATA),
34372    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34373    #[doc = ""]
34374    #[doc = "ID: 235"]
34375    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34376    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34377    #[doc = ""]
34378    #[doc = "ID: 93"]
34379    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34380    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34381    #[doc = ""]
34382    #[doc = "ID: 91"]
34383    HIL_CONTROLS(HIL_CONTROLS_DATA),
34384    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34385    #[doc = ""]
34386    #[doc = "ID: 113"]
34387    HIL_GPS(HIL_GPS_DATA),
34388    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34389    #[doc = ""]
34390    #[doc = "ID: 114"]
34391    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34392    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34393    #[doc = ""]
34394    #[doc = "ID: 92"]
34395    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34396    #[doc = "The IMU readings in SI units in NED body frame."]
34397    #[doc = ""]
34398    #[doc = "ID: 107"]
34399    HIL_SENSOR(HIL_SENSOR_DATA),
34400    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34401    #[doc = ""]
34402    #[doc = "ID: 90"]
34403    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34404    HIL_STATE(HIL_STATE_DATA),
34405    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34406    #[doc = ""]
34407    #[doc = "ID: 115"]
34408    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34409    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34410    #[doc = ""]
34411    #[doc = "ID: 242"]
34412    HOME_POSITION(HOME_POSITION_DATA),
34413    #[doc = "Temperature and humidity from hygrometer."]
34414    #[doc = ""]
34415    #[doc = "ID: 12920"]
34416    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34417    #[doc = "Illuminator status."]
34418    #[doc = ""]
34419    #[doc = "ID: 440"]
34420    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34421    #[doc = "Status of the Iridium SBD link."]
34422    #[doc = ""]
34423    #[doc = "ID: 335"]
34424    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34425    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34426    #[doc = ""]
34427    #[doc = "ID: 149"]
34428    LANDING_TARGET(LANDING_TARGET_DATA),
34429    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34430    #[doc = ""]
34431    #[doc = "ID: 8"]
34432    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34433    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34434    #[doc = ""]
34435    #[doc = "ID: 32"]
34436    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34437    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34438    #[doc = ""]
34439    #[doc = "ID: 64"]
34440    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34441    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34442    #[doc = ""]
34443    #[doc = "ID: 89"]
34444    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34445    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34446    #[doc = ""]
34447    #[doc = "ID: 268"]
34448    LOGGING_ACK(LOGGING_ACK_DATA),
34449    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34450    #[doc = ""]
34451    #[doc = "ID: 266"]
34452    LOGGING_DATA(LOGGING_DATA_DATA),
34453    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34454    #[doc = ""]
34455    #[doc = "ID: 267"]
34456    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34457    #[doc = "Reply to LOG_REQUEST_DATA."]
34458    #[doc = ""]
34459    #[doc = "ID: 120"]
34460    LOG_DATA(LOG_DATA_DATA),
34461    #[doc = "Reply to LOG_REQUEST_LIST."]
34462    #[doc = ""]
34463    #[doc = "ID: 118"]
34464    LOG_ENTRY(LOG_ENTRY_DATA),
34465    #[doc = "Erase all logs."]
34466    #[doc = ""]
34467    #[doc = "ID: 121"]
34468    LOG_ERASE(LOG_ERASE_DATA),
34469    #[doc = "Request a chunk of a log."]
34470    #[doc = ""]
34471    #[doc = "ID: 119"]
34472    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34473    #[doc = "Stop log transfer and resume normal logging."]
34474    #[doc = ""]
34475    #[doc = "ID: 122"]
34476    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34477    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34478    #[doc = ""]
34479    #[doc = "ID: 117"]
34480    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34481    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34482    #[doc = ""]
34483    #[doc = "ID: 192"]
34484    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34485    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34486    #[doc = ""]
34487    #[doc = "ID: 69"]
34488    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34489    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34490    #[doc = ""]
34491    #[doc = "ID: 81"]
34492    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34493    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34494    #[doc = ""]
34495    #[doc = "ID: 249"]
34496    MEMORY_VECT(MEMORY_VECT_DATA),
34497    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34498    #[doc = ""]
34499    #[doc = "ID: 244"]
34500    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34501    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34502    #[doc = ""]
34503    #[doc = "ID: 47"]
34504    MISSION_ACK(MISSION_ACK_DATA),
34505    #[doc = "Delete all mission items at once."]
34506    #[doc = ""]
34507    #[doc = "ID: 45"]
34508    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34509    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34510    #[doc = ""]
34511    #[doc = "ID: 44"]
34512    MISSION_COUNT(MISSION_COUNT_DATA),
34513    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34514    #[doc = ""]
34515    #[doc = "ID: 42"]
34516    MISSION_CURRENT(MISSION_CURRENT_DATA),
34517    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34518    #[doc = ""]
34519    #[doc = "ID: 39"]
34520    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34521    MISSION_ITEM(MISSION_ITEM_DATA),
34522    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34523    #[doc = ""]
34524    #[doc = "ID: 73"]
34525    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34526    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34527    #[doc = ""]
34528    #[doc = "ID: 46"]
34529    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34530    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34531    #[doc = ""]
34532    #[doc = "ID: 40"]
34533    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34534    MISSION_REQUEST(MISSION_REQUEST_DATA),
34535    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34536    #[doc = ""]
34537    #[doc = "ID: 51"]
34538    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34539    #[doc = "Request the overall list of mission items from the system/component."]
34540    #[doc = ""]
34541    #[doc = "ID: 43"]
34542    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34543    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34544    #[doc = ""]
34545    #[doc = "ID: 37"]
34546    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34548    #[doc = ""]
34549    #[doc = "ID: 41"]
34550    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34551    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34552    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34553    #[doc = ""]
34554    #[doc = "ID: 38"]
34555    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34556    #[doc = "Orientation of a mount."]
34557    #[doc = ""]
34558    #[doc = "ID: 265"]
34559    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34560    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34561    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34562    #[doc = ""]
34563    #[doc = "ID: 251"]
34564    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34565    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34566    #[doc = ""]
34567    #[doc = "ID: 252"]
34568    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34569    #[doc = "The state of the navigation and position controller."]
34570    #[doc = ""]
34571    #[doc = "ID: 62"]
34572    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34573    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34574    #[doc = ""]
34575    #[doc = "ID: 330"]
34576    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34577    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34578    #[doc = ""]
34579    #[doc = "ID: 331"]
34580    ODOMETRY(ODOMETRY_DATA),
34581    #[doc = "Hardware status sent by an onboard computer."]
34582    #[doc = ""]
34583    #[doc = "ID: 390"]
34584    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34585    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34586    #[doc = ""]
34587    #[doc = "ID: 12918"]
34588    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34589    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34590    #[doc = ""]
34591    #[doc = "ID: 12902"]
34592    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34593    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34594    #[doc = ""]
34595    #[doc = "ID: 12900"]
34596    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34597    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34598    #[doc = ""]
34599    #[doc = "ID: 12901"]
34600    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34601    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34602    #[doc = ""]
34603    #[doc = "ID: 12915"]
34604    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34605    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34606    #[doc = ""]
34607    #[doc = "ID: 12905"]
34608    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34609    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34610    #[doc = ""]
34611    #[doc = "ID: 12903"]
34612    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34613    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34614    #[doc = ""]
34615    #[doc = "ID: 12904"]
34616    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34617    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34618    #[doc = ""]
34619    #[doc = "ID: 12919"]
34620    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34621    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34622    #[doc = ""]
34623    #[doc = "ID: 100"]
34624    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34625    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34626    #[doc = ""]
34627    #[doc = "ID: 106"]
34628    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34629    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34630    #[doc = ""]
34631    #[doc = "ID: 360"]
34632    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34633    #[doc = "Response from a PARAM_EXT_SET message."]
34634    #[doc = ""]
34635    #[doc = "ID: 324"]
34636    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34637    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34638    #[doc = ""]
34639    #[doc = "ID: 321"]
34640    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34641    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34642    #[doc = ""]
34643    #[doc = "ID: 320"]
34644    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34645    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34646    #[doc = ""]
34647    #[doc = "ID: 323"]
34648    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34649    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34650    #[doc = ""]
34651    #[doc = "ID: 322"]
34652    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34653    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34654    #[doc = ""]
34655    #[doc = "ID: 50"]
34656    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34657    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34658    #[doc = ""]
34659    #[doc = "ID: 21"]
34660    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34661    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34662    #[doc = ""]
34663    #[doc = "ID: 20"]
34664    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34665    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34666    #[doc = ""]
34667    #[doc = "ID: 23"]
34668    PARAM_SET(PARAM_SET_DATA),
34669    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34670    #[doc = ""]
34671    #[doc = "ID: 22"]
34672    PARAM_VALUE(PARAM_VALUE_DATA),
34673    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34674    #[doc = ""]
34675    #[doc = "ID: 4"]
34676    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34677    PING(PING_DATA),
34678    #[doc = "Control vehicle tone generation (buzzer)."]
34679    #[doc = ""]
34680    #[doc = "ID: 258"]
34681    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34682    PLAY_TUNE(PLAY_TUNE_DATA),
34683    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34684    #[doc = ""]
34685    #[doc = "ID: 400"]
34686    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34687    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34688    #[doc = ""]
34689    #[doc = "ID: 87"]
34690    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34691    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34692    #[doc = ""]
34693    #[doc = "ID: 85"]
34694    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34695    #[doc = "Power supply status."]
34696    #[doc = ""]
34697    #[doc = "ID: 125"]
34698    POWER_STATUS(POWER_STATUS_DATA),
34699    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34700    #[doc = ""]
34701    #[doc = "ID: 300"]
34702    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34703    #[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
34704    #[doc = ""]
34705    #[doc = "ID: 420"]
34706    RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA),
34707    #[doc = "Status generated by radio and injected into MAVLink stream."]
34708    #[doc = ""]
34709    #[doc = "ID: 109"]
34710    RADIO_STATUS(RADIO_STATUS_DATA),
34711    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34712    #[doc = ""]
34713    #[doc = "ID: 27"]
34714    RAW_IMU(RAW_IMU_DATA),
34715    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34716    #[doc = ""]
34717    #[doc = "ID: 28"]
34718    RAW_PRESSURE(RAW_PRESSURE_DATA),
34719    #[doc = "RPM sensor data message."]
34720    #[doc = ""]
34721    #[doc = "ID: 339"]
34722    RAW_RPM(RAW_RPM_DATA),
34723    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34724    #[doc = ""]
34725    #[doc = "ID: 65"]
34726    RC_CHANNELS(RC_CHANNELS_DATA),
34727    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34728    #[doc = ""]
34729    #[doc = "ID: 70"]
34730    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34731    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34732    #[doc = ""]
34733    #[doc = "ID: 35"]
34734    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34735    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34736    #[doc = ""]
34737    #[doc = "ID: 34"]
34738    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34739    #[doc = "Request a data stream."]
34740    #[doc = ""]
34741    #[doc = "ID: 66"]
34742    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34743    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34744    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34745    #[doc = ""]
34746    #[doc = "ID: 412"]
34747    REQUEST_EVENT(REQUEST_EVENT_DATA),
34748    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34749    #[doc = ""]
34750    #[doc = "ID: 142"]
34751    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34752    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34753    #[doc = ""]
34754    #[doc = "ID: 413"]
34755    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34756    #[doc = "Read out the safety zone the MAV currently assumes."]
34757    #[doc = ""]
34758    #[doc = "ID: 55"]
34759    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34760    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34761    #[doc = ""]
34762    #[doc = "ID: 54"]
34763    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34764    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34765    #[doc = ""]
34766    #[doc = "ID: 26"]
34767    SCALED_IMU(SCALED_IMU_DATA),
34768    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34769    #[doc = ""]
34770    #[doc = "ID: 116"]
34771    SCALED_IMU2(SCALED_IMU2_DATA),
34772    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34773    #[doc = ""]
34774    #[doc = "ID: 129"]
34775    SCALED_IMU3(SCALED_IMU3_DATA),
34776    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34777    #[doc = ""]
34778    #[doc = "ID: 29"]
34779    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34780    #[doc = "Barometer readings for 2nd barometer."]
34781    #[doc = ""]
34782    #[doc = "ID: 137"]
34783    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34784    #[doc = "Barometer readings for 3rd barometer."]
34785    #[doc = ""]
34786    #[doc = "ID: 143"]
34787    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34788    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34789    #[doc = ""]
34790    #[doc = "ID: 126"]
34791    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34792    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
34793    #[doc = ""]
34794    #[doc = "ID: 36"]
34795    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34796    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
34797    #[doc = ""]
34798    #[doc = "ID: 256"]
34799    SETUP_SIGNING(SETUP_SIGNING_DATA),
34800    #[doc = "Set the vehicle attitude and body angular rates."]
34801    #[doc = ""]
34802    #[doc = "ID: 139"]
34803    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34804    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
34805    #[doc = ""]
34806    #[doc = "ID: 82"]
34807    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34808    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
34809    #[doc = ""]
34810    #[doc = "ID: 48"]
34811    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34812    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34813    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
34814    #[doc = ""]
34815    #[doc = "ID: 243"]
34816    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34817    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34818    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
34819    #[doc = ""]
34820    #[doc = "ID: 11"]
34821    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34822    SET_MODE(SET_MODE_DATA),
34823    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
34824    #[doc = ""]
34825    #[doc = "ID: 86"]
34826    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34827    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
34828    #[doc = ""]
34829    #[doc = "ID: 84"]
34830    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34831    #[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
34832    #[doc = ""]
34833    #[doc = "ID: 354"]
34834    SET_VELOCITY_LIMITS(SET_VELOCITY_LIMITS_DATA),
34835    #[doc = "Status of simulation environment, if used."]
34836    #[doc = ""]
34837    #[doc = "ID: 108"]
34838    SIM_STATE(SIM_STATE_DATA),
34839    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
34840    #[doc = ""]
34841    #[doc = "ID: 370"]
34842    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34843    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34844    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34845    #[doc = ""]
34846    #[doc = "ID: 253"]
34847    STATUSTEXT(STATUSTEXT_DATA),
34848    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34849    #[doc = ""]
34850    #[doc = "ID: 261"]
34851    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34852    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34853    #[doc = ""]
34854    #[doc = "ID: 401"]
34855    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34856    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34857    #[doc = ""]
34858    #[doc = "ID: 2"]
34859    SYSTEM_TIME(SYSTEM_TIME_DATA),
34860    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34861    #[doc = ""]
34862    #[doc = "ID: 1"]
34863    SYS_STATUS(SYS_STATUS_DATA),
34864    #[doc = "Current motion information from sensors on a target."]
34865    #[doc = ""]
34866    #[doc = "ID: 510"]
34867    TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA),
34868    #[doc = "The location of a target measured by MAV's onboard sensors."]
34869    #[doc = ""]
34870    #[doc = "ID: 511"]
34871    TARGET_RELATIVE(TARGET_RELATIVE_DATA),
34872    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34873    #[doc = ""]
34874    #[doc = "ID: 135"]
34875    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34876    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34877    #[doc = ""]
34878    #[doc = "ID: 134"]
34879    TERRAIN_DATA(TERRAIN_DATA_DATA),
34880    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34881    #[doc = ""]
34882    #[doc = "ID: 136"]
34883    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34884    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34885    #[doc = ""]
34886    #[doc = "ID: 133"]
34887    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34888    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34889    #[doc = ""]
34890    #[doc = "ID: 111"]
34891    TIMESYNC(TIMESYNC_DATA),
34892    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34893    #[doc = ""]
34894    #[doc = "ID: 380"]
34895    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34896    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34897    #[doc = ""]
34898    #[doc = "ID: 333"]
34899    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34900    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34901    #[doc = ""]
34902    #[doc = "ID: 332"]
34903    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34904    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34905    #[doc = ""]
34906    #[doc = "ID: 385"]
34907    TUNNEL(TUNNEL_DATA),
34908    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34909    #[doc = ""]
34910    #[doc = "ID: 311"]
34911    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34912    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34913    #[doc = ""]
34914    #[doc = "ID: 310"]
34915    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34916    #[doc = "The global position resulting from GPS and sensor fusion."]
34917    #[doc = ""]
34918    #[doc = "ID: 340"]
34919    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34920    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34921    #[doc = ""]
34922    #[doc = "ID: 248"]
34923    V2_EXTENSION(V2_EXTENSION_DATA),
34924    #[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
34925    #[doc = ""]
34926    #[doc = "ID: 355"]
34927    VELOCITY_LIMITS(VELOCITY_LIMITS_DATA),
34928    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34929    #[doc = ""]
34930    #[doc = "ID: 74"]
34931    VFR_HUD(VFR_HUD_DATA),
34932    #[doc = "Vibration levels and accelerometer clipping."]
34933    #[doc = ""]
34934    #[doc = "ID: 241"]
34935    VIBRATION(VIBRATION_DATA),
34936    #[doc = "Global position estimate from a Vicon motion system source."]
34937    #[doc = ""]
34938    #[doc = "ID: 104"]
34939    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34940    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34941    #[doc = ""]
34942    #[doc = "ID: 269"]
34943    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34944    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34945    #[doc = ""]
34946    #[doc = "ID: 270"]
34947    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34948    #[doc = "Local position/attitude estimate from a vision source."]
34949    #[doc = ""]
34950    #[doc = "ID: 102"]
34951    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34952    #[doc = "Speed estimate from a vision source."]
34953    #[doc = ""]
34954    #[doc = "ID: 103"]
34955    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34956    #[doc = "Cumulative distance traveled for each reported wheel."]
34957    #[doc = ""]
34958    #[doc = "ID: 9000"]
34959    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34960    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34961    #[doc = ""]
34962    #[doc = "ID: 299"]
34963    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34964    #[doc = "Winch status."]
34965    #[doc = ""]
34966    #[doc = "ID: 9005"]
34967    WINCH_STATUS(WINCH_STATUS_DATA),
34968    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34969    #[doc = ""]
34970    #[doc = "ID: 231"]
34971    WIND_COV(WIND_COV_DATA),
34972}
34973impl MavMessage {
34974    pub const fn all_ids() -> &'static [u32] {
34975        &[
34976            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34977            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34978            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34979            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34980            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34981            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34982            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34983            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34984            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34985            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34986            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34987            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34988            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34989            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34990            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34991            295u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32,
34992            330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 354u32,
34993            355u32, 360u32, 361u32, 369u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
34994            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
34995            412u32, 413u32, 414u32, 415u32, 420u32, 435u32, 436u32, 437u32, 440u32, 441u32, 510u32,
34996            511u32, 512u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32,
34997            12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
34998        ]
34999    }
35000}
35001impl Message for MavMessage {
35002    fn parse(
35003        version: MavlinkVersion,
35004        id: u32,
35005        payload: &[u8],
35006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35007        match id {
35008            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35009                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35010                    .map(Self::ACTUATOR_CONTROL_TARGET)
35011            }
35012            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35013                .map(Self::ACTUATOR_OUTPUT_STATUS),
35014            ADSB_VEHICLE_DATA::ID => {
35015                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35016            }
35017            AIRSPEED_DATA::ID => AIRSPEED_DATA::deser(version, payload).map(Self::AIRSPEED),
35018            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35019            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35020            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35021            ATTITUDE_QUATERNION_DATA::ID => {
35022                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35023            }
35024            ATTITUDE_QUATERNION_COV_DATA::ID => {
35025                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35026                    .map(Self::ATTITUDE_QUATERNION_COV)
35027            }
35028            ATTITUDE_TARGET_DATA::ID => {
35029                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35030            }
35031            ATT_POS_MOCAP_DATA::ID => {
35032                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35033            }
35034            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35035            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35036                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35037                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35038            }
35039            AUTOPILOT_VERSION_DATA::ID => {
35040                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35041            }
35042            AVAILABLE_MODES_DATA::ID => {
35043                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35044            }
35045            AVAILABLE_MODES_MONITOR_DATA::ID => {
35046                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35047                    .map(Self::AVAILABLE_MODES_MONITOR)
35048            }
35049            BATTERY_INFO_DATA::ID => {
35050                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35051            }
35052            BATTERY_STATUS_DATA::ID => {
35053                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35054            }
35055            BATTERY_STATUS_V2_DATA::ID => {
35056                BATTERY_STATUS_V2_DATA::deser(version, payload).map(Self::BATTERY_STATUS_V2)
35057            }
35058            BUTTON_CHANGE_DATA::ID => {
35059                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35060            }
35061            CAMERA_CAPTURE_STATUS_DATA::ID => {
35062                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35063            }
35064            CAMERA_FOV_STATUS_DATA::ID => {
35065                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35066            }
35067            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35068                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35069            }
35070            CAMERA_INFORMATION_DATA::ID => {
35071                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35072            }
35073            CAMERA_SETTINGS_DATA::ID => {
35074                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35075            }
35076            CAMERA_THERMAL_RANGE_DATA::ID => {
35077                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35078            }
35079            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35080                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35081                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35082            }
35083            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35084                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35085                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35086            }
35087            CAMERA_TRIGGER_DATA::ID => {
35088                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35089            }
35090            CANFD_FRAME_DATA::ID => {
35091                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35092            }
35093            CAN_FILTER_MODIFY_DATA::ID => {
35094                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35095            }
35096            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35097            CELLULAR_CONFIG_DATA::ID => {
35098                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35099            }
35100            CELLULAR_STATUS_DATA::ID => {
35101                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35102            }
35103            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35104                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35105                    .map(Self::CHANGE_OPERATOR_CONTROL)
35106            }
35107            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35108                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35109                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35110            }
35111            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35112            COMMAND_ACK_DATA::ID => {
35113                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35114            }
35115            COMMAND_CANCEL_DATA::ID => {
35116                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35117            }
35118            COMMAND_INT_DATA::ID => {
35119                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35120            }
35121            COMMAND_LONG_DATA::ID => {
35122                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35123            }
35124            COMPONENT_INFORMATION_DATA::ID => {
35125                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35126            }
35127            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35128                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35129                    .map(Self::COMPONENT_INFORMATION_BASIC)
35130            }
35131            COMPONENT_METADATA_DATA::ID => {
35132                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35133            }
35134            CONTROL_STATUS_DATA::ID => {
35135                CONTROL_STATUS_DATA::deser(version, payload).map(Self::CONTROL_STATUS)
35136            }
35137            CONTROL_SYSTEM_STATE_DATA::ID => {
35138                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35139            }
35140            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35141                .map(Self::CURRENT_EVENT_SEQUENCE),
35142            CURRENT_MODE_DATA::ID => {
35143                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35144            }
35145            DATA_STREAM_DATA::ID => {
35146                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35147            }
35148            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35149                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35150                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35151            }
35152            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35153            DEBUG_FLOAT_ARRAY_DATA::ID => {
35154                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35155            }
35156            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35157            DISTANCE_SENSOR_DATA::ID => {
35158                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35159            }
35160            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35161            ENCAPSULATED_DATA_DATA::ID => {
35162                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35163            }
35164            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35165            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35166            ESTIMATOR_STATUS_DATA::ID => {
35167                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35168            }
35169            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35170            EXTENDED_SYS_STATE_DATA::ID => {
35171                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35172            }
35173            FENCE_STATUS_DATA::ID => {
35174                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35175            }
35176            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => {
35177                FIGURE_EIGHT_EXECUTION_STATUS_DATA::deser(version, payload)
35178                    .map(Self::FIGURE_EIGHT_EXECUTION_STATUS)
35179            }
35180            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35181                .map(Self::FILE_TRANSFER_PROTOCOL),
35182            FLIGHT_INFORMATION_DATA::ID => {
35183                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35184            }
35185            FOLLOW_TARGET_DATA::ID => {
35186                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35187            }
35188            FUEL_STATUS_DATA::ID => {
35189                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35190            }
35191            GENERATOR_STATUS_DATA::ID => {
35192                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35193            }
35194            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35195                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35196                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35197            }
35198            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35199                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35200                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35201            }
35202            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35203                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35204                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35205            }
35206            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35207                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35208                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35209            }
35210            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35211                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35212                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35213            }
35214            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35215                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35216                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35217            }
35218            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35219                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35220                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35221            }
35222            GIMBAL_MANAGER_STATUS_DATA::ID => {
35223                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35224            }
35225            GLOBAL_POSITION_INT_DATA::ID => {
35226                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35227            }
35228            GLOBAL_POSITION_INT_COV_DATA::ID => {
35229                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35230                    .map(Self::GLOBAL_POSITION_INT_COV)
35231            }
35232            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35233                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35234                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35235            }
35236            GNSS_INTEGRITY_DATA::ID => {
35237                GNSS_INTEGRITY_DATA::deser(version, payload).map(Self::GNSS_INTEGRITY)
35238            }
35239            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35240            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35241            GPS_GLOBAL_ORIGIN_DATA::ID => {
35242                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35243            }
35244            GPS_INJECT_DATA_DATA::ID => {
35245                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35246            }
35247            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35248            GPS_RAW_INT_DATA::ID => {
35249                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35250            }
35251            GPS_RTCM_DATA_DATA::ID => {
35252                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35253            }
35254            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35255            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35256            GROUP_END_DATA::ID => GROUP_END_DATA::deser(version, payload).map(Self::GROUP_END),
35257            GROUP_START_DATA::ID => {
35258                GROUP_START_DATA::deser(version, payload).map(Self::GROUP_START)
35259            }
35260            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35261            HIGHRES_IMU_DATA::ID => {
35262                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35263            }
35264            HIGH_LATENCY_DATA::ID => {
35265                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35266            }
35267            HIGH_LATENCY2_DATA::ID => {
35268                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35269            }
35270            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35271                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35272            }
35273            HIL_CONTROLS_DATA::ID => {
35274                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35275            }
35276            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35277            HIL_OPTICAL_FLOW_DATA::ID => {
35278                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35279            }
35280            HIL_RC_INPUTS_RAW_DATA::ID => {
35281                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35282            }
35283            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35284            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35285            HIL_STATE_QUATERNION_DATA::ID => {
35286                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
35287            }
35288            HOME_POSITION_DATA::ID => {
35289                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
35290            }
35291            HYGROMETER_SENSOR_DATA::ID => {
35292                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
35293            }
35294            ILLUMINATOR_STATUS_DATA::ID => {
35295                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
35296            }
35297            ISBD_LINK_STATUS_DATA::ID => {
35298                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
35299            }
35300            LANDING_TARGET_DATA::ID => {
35301                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
35302            }
35303            LINK_NODE_STATUS_DATA::ID => {
35304                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
35305            }
35306            LOCAL_POSITION_NED_DATA::ID => {
35307                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
35308            }
35309            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
35310                .map(Self::LOCAL_POSITION_NED_COV),
35311            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35312                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
35313                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
35314            }
35315            LOGGING_ACK_DATA::ID => {
35316                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
35317            }
35318            LOGGING_DATA_DATA::ID => {
35319                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
35320            }
35321            LOGGING_DATA_ACKED_DATA::ID => {
35322                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
35323            }
35324            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
35325            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
35326            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
35327            LOG_REQUEST_DATA_DATA::ID => {
35328                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
35329            }
35330            LOG_REQUEST_END_DATA::ID => {
35331                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
35332            }
35333            LOG_REQUEST_LIST_DATA::ID => {
35334                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
35335            }
35336            MAG_CAL_REPORT_DATA::ID => {
35337                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35338            }
35339            MANUAL_CONTROL_DATA::ID => {
35340                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35341            }
35342            MANUAL_SETPOINT_DATA::ID => {
35343                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35344            }
35345            MEMORY_VECT_DATA::ID => {
35346                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35347            }
35348            MESSAGE_INTERVAL_DATA::ID => {
35349                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35350            }
35351            MISSION_ACK_DATA::ID => {
35352                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35353            }
35354            MISSION_CLEAR_ALL_DATA::ID => {
35355                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35356            }
35357            MISSION_COUNT_DATA::ID => {
35358                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35359            }
35360            MISSION_CURRENT_DATA::ID => {
35361                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35362            }
35363            MISSION_ITEM_DATA::ID => {
35364                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35365            }
35366            MISSION_ITEM_INT_DATA::ID => {
35367                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35368            }
35369            MISSION_ITEM_REACHED_DATA::ID => {
35370                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35371            }
35372            MISSION_REQUEST_DATA::ID => {
35373                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35374            }
35375            MISSION_REQUEST_INT_DATA::ID => {
35376                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35377            }
35378            MISSION_REQUEST_LIST_DATA::ID => {
35379                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35380            }
35381            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35382                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35383                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35384            }
35385            MISSION_SET_CURRENT_DATA::ID => {
35386                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35387            }
35388            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35389                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35390                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35391            }
35392            MOUNT_ORIENTATION_DATA::ID => {
35393                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35394            }
35395            NAMED_VALUE_FLOAT_DATA::ID => {
35396                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35397            }
35398            NAMED_VALUE_INT_DATA::ID => {
35399                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35400            }
35401            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35402                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35403            }
35404            OBSTACLE_DISTANCE_DATA::ID => {
35405                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35406            }
35407            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35408            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35409                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35410                    .map(Self::ONBOARD_COMPUTER_STATUS)
35411            }
35412            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35413                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35414                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35415            }
35416            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35417                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35418                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35419            }
35420            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35421                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35422            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35423                .map(Self::OPEN_DRONE_ID_LOCATION),
35424            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35425                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35426                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35427            }
35428            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35429                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35430                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35431            }
35432            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35433                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35434            }
35435            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35436                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35437            }
35438            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35439                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35440                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35441            }
35442            OPTICAL_FLOW_DATA::ID => {
35443                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35444            }
35445            OPTICAL_FLOW_RAD_DATA::ID => {
35446                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35447            }
35448            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35449                .map(Self::ORBIT_EXECUTION_STATUS),
35450            PARAM_EXT_ACK_DATA::ID => {
35451                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35452            }
35453            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35454                .map(Self::PARAM_EXT_REQUEST_LIST),
35455            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35456                .map(Self::PARAM_EXT_REQUEST_READ),
35457            PARAM_EXT_SET_DATA::ID => {
35458                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35459            }
35460            PARAM_EXT_VALUE_DATA::ID => {
35461                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35462            }
35463            PARAM_MAP_RC_DATA::ID => {
35464                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35465            }
35466            PARAM_REQUEST_LIST_DATA::ID => {
35467                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35468            }
35469            PARAM_REQUEST_READ_DATA::ID => {
35470                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35471            }
35472            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35473            PARAM_VALUE_DATA::ID => {
35474                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35475            }
35476            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35477            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35478            PLAY_TUNE_V2_DATA::ID => {
35479                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35480            }
35481            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35482                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35483                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35484            }
35485            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35486                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35487                    .map(Self::POSITION_TARGET_LOCAL_NED)
35488            }
35489            POWER_STATUS_DATA::ID => {
35490                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35491            }
35492            PROTOCOL_VERSION_DATA::ID => {
35493                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35494            }
35495            RADIO_RC_CHANNELS_DATA::ID => {
35496                RADIO_RC_CHANNELS_DATA::deser(version, payload).map(Self::RADIO_RC_CHANNELS)
35497            }
35498            RADIO_STATUS_DATA::ID => {
35499                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35500            }
35501            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35502            RAW_PRESSURE_DATA::ID => {
35503                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35504            }
35505            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35506            RC_CHANNELS_DATA::ID => {
35507                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35508            }
35509            RC_CHANNELS_OVERRIDE_DATA::ID => {
35510                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35511            }
35512            RC_CHANNELS_RAW_DATA::ID => {
35513                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35514            }
35515            RC_CHANNELS_SCALED_DATA::ID => {
35516                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35517            }
35518            REQUEST_DATA_STREAM_DATA::ID => {
35519                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35520            }
35521            REQUEST_EVENT_DATA::ID => {
35522                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35523            }
35524            RESOURCE_REQUEST_DATA::ID => {
35525                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35526            }
35527            RESPONSE_EVENT_ERROR_DATA::ID => {
35528                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35529            }
35530            SAFETY_ALLOWED_AREA_DATA::ID => {
35531                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35532            }
35533            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35534                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35535                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35536            }
35537            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35538            SCALED_IMU2_DATA::ID => {
35539                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35540            }
35541            SCALED_IMU3_DATA::ID => {
35542                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35543            }
35544            SCALED_PRESSURE_DATA::ID => {
35545                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35546            }
35547            SCALED_PRESSURE2_DATA::ID => {
35548                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35549            }
35550            SCALED_PRESSURE3_DATA::ID => {
35551                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35552            }
35553            SERIAL_CONTROL_DATA::ID => {
35554                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35555            }
35556            SERVO_OUTPUT_RAW_DATA::ID => {
35557                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35558            }
35559            SETUP_SIGNING_DATA::ID => {
35560                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35561            }
35562            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35563                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35564                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35565            }
35566            SET_ATTITUDE_TARGET_DATA::ID => {
35567                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35568            }
35569            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35570                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35571            }
35572            SET_HOME_POSITION_DATA::ID => {
35573                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35574            }
35575            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35576            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35577                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35578                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35579            }
35580            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35581                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35582                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35583            }
35584            SET_VELOCITY_LIMITS_DATA::ID => {
35585                SET_VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::SET_VELOCITY_LIMITS)
35586            }
35587            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35588            SMART_BATTERY_INFO_DATA::ID => {
35589                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35590            }
35591            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35592            STORAGE_INFORMATION_DATA::ID => {
35593                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35594            }
35595            SUPPORTED_TUNES_DATA::ID => {
35596                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35597            }
35598            SYSTEM_TIME_DATA::ID => {
35599                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35600            }
35601            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35602            TARGET_ABSOLUTE_DATA::ID => {
35603                TARGET_ABSOLUTE_DATA::deser(version, payload).map(Self::TARGET_ABSOLUTE)
35604            }
35605            TARGET_RELATIVE_DATA::ID => {
35606                TARGET_RELATIVE_DATA::deser(version, payload).map(Self::TARGET_RELATIVE)
35607            }
35608            TERRAIN_CHECK_DATA::ID => {
35609                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35610            }
35611            TERRAIN_DATA_DATA::ID => {
35612                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35613            }
35614            TERRAIN_REPORT_DATA::ID => {
35615                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35616            }
35617            TERRAIN_REQUEST_DATA::ID => {
35618                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35619            }
35620            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35621            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35622                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35623                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35624            }
35625            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35626                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35627                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35628            }
35629            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35630                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35631                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35632            }
35633            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35634            UAVCAN_NODE_INFO_DATA::ID => {
35635                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35636            }
35637            UAVCAN_NODE_STATUS_DATA::ID => {
35638                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35639            }
35640            UTM_GLOBAL_POSITION_DATA::ID => {
35641                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35642            }
35643            V2_EXTENSION_DATA::ID => {
35644                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35645            }
35646            VELOCITY_LIMITS_DATA::ID => {
35647                VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::VELOCITY_LIMITS)
35648            }
35649            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35650            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35651            VICON_POSITION_ESTIMATE_DATA::ID => {
35652                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35653                    .map(Self::VICON_POSITION_ESTIMATE)
35654            }
35655            VIDEO_STREAM_INFORMATION_DATA::ID => {
35656                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35657                    .map(Self::VIDEO_STREAM_INFORMATION)
35658            }
35659            VIDEO_STREAM_STATUS_DATA::ID => {
35660                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35661            }
35662            VISION_POSITION_ESTIMATE_DATA::ID => {
35663                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35664                    .map(Self::VISION_POSITION_ESTIMATE)
35665            }
35666            VISION_SPEED_ESTIMATE_DATA::ID => {
35667                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35668            }
35669            WHEEL_DISTANCE_DATA::ID => {
35670                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35671            }
35672            WIFI_CONFIG_AP_DATA::ID => {
35673                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35674            }
35675            WINCH_STATUS_DATA::ID => {
35676                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35677            }
35678            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35679            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35680        }
35681    }
35682    fn message_name(&self) -> &'static str {
35683        match self {
35684            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35685            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35686            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35687            Self::AIRSPEED(..) => AIRSPEED_DATA::NAME,
35688            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35689            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35690            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35691            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35692            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35693            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35694            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35695            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35696            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35697                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35698            }
35699            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35700            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35701            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35702            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35703            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35704            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::NAME,
35705            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35706            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35707            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35708            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35709            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35710            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35711            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35712            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35713            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35714            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35715            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35716            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35717            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35718            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35719            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35720            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35721            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35722            Self::COLLISION(..) => COLLISION_DATA::NAME,
35723            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35724            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35725            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35726            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35727            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35728            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35729            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35730            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::NAME,
35731            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35732            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35733            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35734            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35735            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35736            Self::DEBUG(..) => DEBUG_DATA::NAME,
35737            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35738            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35739            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35740            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
35741            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
35742            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
35743            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
35744            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
35745            Self::EVENT(..) => EVENT_DATA::NAME,
35746            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
35747            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
35748            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
35749            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
35750            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
35751            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
35752            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
35753            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
35754            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35755            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35756            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35757            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35758            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35759            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35760                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35761            }
35762            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35763            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35764            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35765            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35766            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35767            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::NAME,
35768            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35769            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35770            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35771            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35772            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35773            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35774            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35775            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35776            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35777            Self::GROUP_END(..) => GROUP_END_DATA::NAME,
35778            Self::GROUP_START(..) => GROUP_START_DATA::NAME,
35779            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35780            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35781            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35782            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35783            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35784            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35785            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35786            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35787            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35788            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35789            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35790            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35791            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35792            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35793            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35794            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35795            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35796            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35797            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35798            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35799            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35800                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35801            }
35802            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35803            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35804            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35805            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35806            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35807            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35808            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35809            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35810            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35811            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35812            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35813            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35814            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35815            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35816            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35817            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35818            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35819            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35820            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35821            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35822            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35823            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35824            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35825            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35826            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35827            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35828            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35829            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35830            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35831            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35832            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35833            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35834            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35835            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35836            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35837            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35838            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35839            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35840            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35841            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35842            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35843            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35844            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35845            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35846            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35847            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35848            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35849            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35850            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35851            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35852            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35853            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35854            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35855            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35856            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35857            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35858            Self::PING(..) => PING_DATA::NAME,
35859            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35860            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35861            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35862            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35863            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35864            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35865            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::NAME,
35866            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35867            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35868            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35869            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35870            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35871            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35872            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35873            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35874            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35875            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35876            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35877            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35878            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35879            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35880            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35881            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35882            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35883            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35884            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35885            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35886            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35887            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35888            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35889            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35890            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35891            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35892            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35893            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35894            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35895            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35896            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::NAME,
35897            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35898            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35899            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35900            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35901            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35902            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35903            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35904            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::NAME,
35905            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::NAME,
35906            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35907            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35908            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35909            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35910            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35911            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35912            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35913                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35914            }
35915            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35916                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35917            }
35918            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35919            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35920            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35921            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35922            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35923            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::NAME,
35924            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35925            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35926            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35927            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35928            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35929            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35930            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35931            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35932            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35933            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35934            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35935        }
35936    }
35937    fn message_id(&self) -> u32 {
35938        match self {
35939            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35940            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35941            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35942            Self::AIRSPEED(..) => AIRSPEED_DATA::ID,
35943            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35944            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35945            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35946            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35947            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35948            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35949            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35950            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35951            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35952                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35953            }
35954            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35955            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35956            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35957            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35958            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35959            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::ID,
35960            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35961            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35962            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35963            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35964            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35965            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35966            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35967            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35968            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35969            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35970            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35971            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35972            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35973            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35974            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35975            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35976            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35977            Self::COLLISION(..) => COLLISION_DATA::ID,
35978            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35979            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35980            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35981            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35982            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35983            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35984            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35985            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::ID,
35986            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35987            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35988            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35989            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35990            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35991            Self::DEBUG(..) => DEBUG_DATA::ID,
35992            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35993            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35994            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35995            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35996            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35997            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35998            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35999            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36000            Self::EVENT(..) => EVENT_DATA::ID,
36001            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36002            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36003            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
36004            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36005            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36006            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36007            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36008            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36009            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36010            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36011            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36012            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36013            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36014            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36015                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36016            }
36017            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36018            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36019            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36020            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36021            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36022            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::ID,
36023            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36024            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36025            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36026            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36027            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36028            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36029            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36030            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36031            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36032            Self::GROUP_END(..) => GROUP_END_DATA::ID,
36033            Self::GROUP_START(..) => GROUP_START_DATA::ID,
36034            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36035            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36036            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36037            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36038            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36039            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36040            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36041            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36042            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36043            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36044            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36045            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36046            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36047            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36048            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36049            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36050            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36051            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36052            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36053            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36054            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36055                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36056            }
36057            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36058            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36059            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36060            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36061            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36062            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36063            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36064            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36065            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36066            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36067            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36068            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36069            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36070            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36071            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36072            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36073            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36074            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36075            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36076            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36077            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36078            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36079            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36080            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36081            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36082            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36083            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36084            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36085            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36086            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36087            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36088            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36089            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36090            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36091            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36092            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36093            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36094            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36095            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36096            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36097            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36098            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36099            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36100            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36101            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36102            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36103            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36104            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36105            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36106            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36107            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36108            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36109            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36110            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36111            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36112            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36113            Self::PING(..) => PING_DATA::ID,
36114            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36115            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36116            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36117            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36118            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36119            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36120            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::ID,
36121            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36122            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36123            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36124            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36125            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36126            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36127            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36128            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36129            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36130            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36131            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36132            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36133            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36134            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36135            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36136            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36137            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36138            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36139            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36140            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36141            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36142            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36143            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36144            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36145            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36146            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36147            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36148            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36149            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36150            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36151            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::ID,
36152            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36153            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36154            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36155            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36156            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36157            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36158            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36159            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::ID,
36160            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::ID,
36161            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36162            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36163            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36164            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36165            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36166            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36167            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36168            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36169                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36170            }
36171            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36172            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36173            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36174            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36175            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36176            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::ID,
36177            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36178            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36179            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36180            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36181            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36182            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36183            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36184            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36185            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36186            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36187            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36188        }
36189    }
36190    fn message_id_from_name(name: &str) -> Option<u32> {
36191        match name {
36192            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36193            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36194            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36195            AIRSPEED_DATA::NAME => Some(AIRSPEED_DATA::ID),
36196            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36197            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36198            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36199            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36200            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36201            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36202            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36203            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36204            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36205                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36206            }
36207            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36208            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36209            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36210            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36211            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36212            BATTERY_STATUS_V2_DATA::NAME => Some(BATTERY_STATUS_V2_DATA::ID),
36213            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36214            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36215            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36216            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36217            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36218            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36219            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36220            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36221            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36222            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36223            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36224            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36225            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36226            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36227            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36228            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36229            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36230            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36231            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36232            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36233            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36234            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36235            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36236            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36237            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36238            CONTROL_STATUS_DATA::NAME => Some(CONTROL_STATUS_DATA::ID),
36239            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36240            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36241            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36242            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36243            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36244            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36245            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36246            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36247            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36248            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36249            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36250            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36251            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36252            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36253            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36254            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36255            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36256            FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME => {
36257                Some(FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID)
36258            }
36259            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36260            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36261            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36262            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36263            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36264            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36265                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36266            }
36267            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36268            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36269            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36270            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36271            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
36272                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
36273            }
36274            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
36275            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
36276            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
36277            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
36278            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
36279                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
36280            }
36281            GNSS_INTEGRITY_DATA::NAME => Some(GNSS_INTEGRITY_DATA::ID),
36282            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
36283            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
36284            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
36285            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
36286            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
36287            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
36288            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
36289            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
36290            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
36291            GROUP_END_DATA::NAME => Some(GROUP_END_DATA::ID),
36292            GROUP_START_DATA::NAME => Some(GROUP_START_DATA::ID),
36293            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
36294            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
36295            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
36296            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
36297            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
36298            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
36299            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
36300            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
36301            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
36302            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
36303            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
36304            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
36305            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
36306            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
36307            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
36308            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
36309            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
36310            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
36311            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
36312            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
36313            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
36314                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
36315            }
36316            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
36317            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
36318            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
36319            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
36320            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
36321            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
36322            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
36323            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
36324            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
36325            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
36326            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
36327            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
36328            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
36329            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
36330            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
36331            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
36332            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
36333            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
36334            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
36335            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
36336            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
36337            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36338            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36339            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36340            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36341            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36342            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36343            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36344            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36345            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36346            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36347            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36348            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36349            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36350            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36351            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36352            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36353            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36354            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36355            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36356            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36357            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36358            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36359            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36360            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36361            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36362            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36363            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36364            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36365            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36366            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36367            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36368            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36369            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36370            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36371            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36372            PING_DATA::NAME => Some(PING_DATA::ID),
36373            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36374            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36375            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36376            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36377            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36378            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36379            RADIO_RC_CHANNELS_DATA::NAME => Some(RADIO_RC_CHANNELS_DATA::ID),
36380            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36381            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36382            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36383            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36384            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36385            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36386            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36387            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36388            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36389            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36390            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36391            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36392            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36393            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36394            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36395            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36396            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36397            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36398            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36399            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36400            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36401            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36402            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36403            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36404            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36405            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36406            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36407            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36408            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36409                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36410            }
36411            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36412                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36413            }
36414            SET_VELOCITY_LIMITS_DATA::NAME => Some(SET_VELOCITY_LIMITS_DATA::ID),
36415            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36416            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36417            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36418            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36419            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36420            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36421            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36422            TARGET_ABSOLUTE_DATA::NAME => Some(TARGET_ABSOLUTE_DATA::ID),
36423            TARGET_RELATIVE_DATA::NAME => Some(TARGET_RELATIVE_DATA::ID),
36424            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36425            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36426            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36427            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36428            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36429            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36430            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36431                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36432            }
36433            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36434                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36435            }
36436            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36437            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36438            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36439            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36440            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36441            VELOCITY_LIMITS_DATA::NAME => Some(VELOCITY_LIMITS_DATA::ID),
36442            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36443            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36444            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36445            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36446            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36447            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36448            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36449            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36450            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36451            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36452            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36453            _ => None,
36454        }
36455    }
36456    fn default_message_from_id(id: u32) -> Option<Self> {
36457        match id {
36458            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36459                ACTUATOR_CONTROL_TARGET_DATA::default(),
36460            )),
36461            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36462                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36463            )),
36464            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36465            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::default())),
36466            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36467            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36468            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36469            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36470                ATTITUDE_QUATERNION_DATA::default(),
36471            )),
36472            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36473                ATTITUDE_QUATERNION_COV_DATA::default(),
36474            )),
36475            ATTITUDE_TARGET_DATA::ID => {
36476                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36477            }
36478            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36479            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36480            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36481                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36482                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36483                ))
36484            }
36485            AUTOPILOT_VERSION_DATA::ID => {
36486                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36487            }
36488            AVAILABLE_MODES_DATA::ID => {
36489                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36490            }
36491            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36492                AVAILABLE_MODES_MONITOR_DATA::default(),
36493            )),
36494            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36495            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36496            BATTERY_STATUS_V2_DATA::ID => {
36497                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::default()))
36498            }
36499            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36500            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36501                CAMERA_CAPTURE_STATUS_DATA::default(),
36502            )),
36503            CAMERA_FOV_STATUS_DATA::ID => {
36504                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36505            }
36506            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36507                CAMERA_IMAGE_CAPTURED_DATA::default(),
36508            )),
36509            CAMERA_INFORMATION_DATA::ID => {
36510                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36511            }
36512            CAMERA_SETTINGS_DATA::ID => {
36513                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36514            }
36515            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36516                CAMERA_THERMAL_RANGE_DATA::default(),
36517            )),
36518            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36519                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36520            )),
36521            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36522                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36523            )),
36524            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36525            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36526            CAN_FILTER_MODIFY_DATA::ID => {
36527                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36528            }
36529            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36530            CELLULAR_CONFIG_DATA::ID => {
36531                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36532            }
36533            CELLULAR_STATUS_DATA::ID => {
36534                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36535            }
36536            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36537                CHANGE_OPERATOR_CONTROL_DATA::default(),
36538            )),
36539            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36540                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36541            )),
36542            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36543            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36544            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36545            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36546            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36547            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36548                COMPONENT_INFORMATION_DATA::default(),
36549            )),
36550            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36551                COMPONENT_INFORMATION_BASIC_DATA::default(),
36552            )),
36553            COMPONENT_METADATA_DATA::ID => {
36554                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36555            }
36556            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::default())),
36557            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36558                CONTROL_SYSTEM_STATE_DATA::default(),
36559            )),
36560            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36561                CURRENT_EVENT_SEQUENCE_DATA::default(),
36562            )),
36563            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36564            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36565            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36566                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36567            )),
36568            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36569            DEBUG_FLOAT_ARRAY_DATA::ID => {
36570                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36571            }
36572            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36573            DISTANCE_SENSOR_DATA::ID => {
36574                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36575            }
36576            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36577            ENCAPSULATED_DATA_DATA::ID => {
36578                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36579            }
36580            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36581            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36582            ESTIMATOR_STATUS_DATA::ID => {
36583                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36584            }
36585            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36586            EXTENDED_SYS_STATE_DATA::ID => {
36587                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36588            }
36589            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36590            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36591                FIGURE_EIGHT_EXECUTION_STATUS_DATA::default(),
36592            )),
36593            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36594                FILE_TRANSFER_PROTOCOL_DATA::default(),
36595            )),
36596            FLIGHT_INFORMATION_DATA::ID => {
36597                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36598            }
36599            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36600            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36601            GENERATOR_STATUS_DATA::ID => {
36602                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36603            }
36604            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36605                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36606            )),
36607            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36608                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36609            )),
36610            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36611                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36612            )),
36613            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36614                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36615            )),
36616            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36617                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36618            )),
36619            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36620                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36621                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36622                ))
36623            }
36624            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36625                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36626            )),
36627            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36628                GIMBAL_MANAGER_STATUS_DATA::default(),
36629            )),
36630            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36631                GLOBAL_POSITION_INT_DATA::default(),
36632            )),
36633            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36634                GLOBAL_POSITION_INT_COV_DATA::default(),
36635            )),
36636            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36637                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36638                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36639                ))
36640            }
36641            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::default())),
36642            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36643            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36644            GPS_GLOBAL_ORIGIN_DATA::ID => {
36645                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36646            }
36647            GPS_INJECT_DATA_DATA::ID => {
36648                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36649            }
36650            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36651            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36652            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36653            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36654            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36655            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::default())),
36656            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::default())),
36657            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36658            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36659            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36660            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36661            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36662                HIL_ACTUATOR_CONTROLS_DATA::default(),
36663            )),
36664            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36665            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36666            HIL_OPTICAL_FLOW_DATA::ID => {
36667                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36668            }
36669            HIL_RC_INPUTS_RAW_DATA::ID => {
36670                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36671            }
36672            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36673            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36674            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36675                HIL_STATE_QUATERNION_DATA::default(),
36676            )),
36677            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36678            HYGROMETER_SENSOR_DATA::ID => {
36679                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36680            }
36681            ILLUMINATOR_STATUS_DATA::ID => {
36682                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36683            }
36684            ISBD_LINK_STATUS_DATA::ID => {
36685                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36686            }
36687            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36688            LINK_NODE_STATUS_DATA::ID => {
36689                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36690            }
36691            LOCAL_POSITION_NED_DATA::ID => {
36692                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36693            }
36694            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36695                LOCAL_POSITION_NED_COV_DATA::default(),
36696            )),
36697            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36698                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36699                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36700                ))
36701            }
36702            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36703            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36704            LOGGING_DATA_ACKED_DATA::ID => {
36705                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36706            }
36707            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36708            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36709            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36710            LOG_REQUEST_DATA_DATA::ID => {
36711                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36712            }
36713            LOG_REQUEST_END_DATA::ID => {
36714                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36715            }
36716            LOG_REQUEST_LIST_DATA::ID => {
36717                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36718            }
36719            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36720            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36721            MANUAL_SETPOINT_DATA::ID => {
36722                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36723            }
36724            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36725            MESSAGE_INTERVAL_DATA::ID => {
36726                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36727            }
36728            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36729            MISSION_CLEAR_ALL_DATA::ID => {
36730                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36731            }
36732            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36733            MISSION_CURRENT_DATA::ID => {
36734                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36735            }
36736            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36737            MISSION_ITEM_INT_DATA::ID => {
36738                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36739            }
36740            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36741                MISSION_ITEM_REACHED_DATA::default(),
36742            )),
36743            MISSION_REQUEST_DATA::ID => {
36744                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36745            }
36746            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36747                MISSION_REQUEST_INT_DATA::default(),
36748            )),
36749            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36750                MISSION_REQUEST_LIST_DATA::default(),
36751            )),
36752            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36753                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36754            )),
36755            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36756                MISSION_SET_CURRENT_DATA::default(),
36757            )),
36758            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36759                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36760            )),
36761            MOUNT_ORIENTATION_DATA::ID => {
36762                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36763            }
36764            NAMED_VALUE_FLOAT_DATA::ID => {
36765                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36766            }
36767            NAMED_VALUE_INT_DATA::ID => {
36768                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36769            }
36770            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36771                NAV_CONTROLLER_OUTPUT_DATA::default(),
36772            )),
36773            OBSTACLE_DISTANCE_DATA::ID => {
36774                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36775            }
36776            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36777            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36778                ONBOARD_COMPUTER_STATUS_DATA::default(),
36779            )),
36780            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36781                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36782            )),
36783            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36784                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36785            )),
36786            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36787                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36788            )),
36789            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36790                OPEN_DRONE_ID_LOCATION_DATA::default(),
36791            )),
36792            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36793                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36794            )),
36795            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36796                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36797            )),
36798            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36799                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36800            )),
36801            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36802                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36803            )),
36804            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36805                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36806            )),
36807            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36808            OPTICAL_FLOW_RAD_DATA::ID => {
36809                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36810            }
36811            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36812                ORBIT_EXECUTION_STATUS_DATA::default(),
36813            )),
36814            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36815            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36816                PARAM_EXT_REQUEST_LIST_DATA::default(),
36817            )),
36818            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36819                PARAM_EXT_REQUEST_READ_DATA::default(),
36820            )),
36821            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36822            PARAM_EXT_VALUE_DATA::ID => {
36823                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36824            }
36825            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36826            PARAM_REQUEST_LIST_DATA::ID => {
36827                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36828            }
36829            PARAM_REQUEST_READ_DATA::ID => {
36830                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36831            }
36832            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36833            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36834            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36835            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36836            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36837            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36838                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36839            )),
36840            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36841                POSITION_TARGET_LOCAL_NED_DATA::default(),
36842            )),
36843            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36844            PROTOCOL_VERSION_DATA::ID => {
36845                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36846            }
36847            RADIO_RC_CHANNELS_DATA::ID => {
36848                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::default()))
36849            }
36850            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36851            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36852            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36853            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36854            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36855            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36856                RC_CHANNELS_OVERRIDE_DATA::default(),
36857            )),
36858            RC_CHANNELS_RAW_DATA::ID => {
36859                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36860            }
36861            RC_CHANNELS_SCALED_DATA::ID => {
36862                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36863            }
36864            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36865                REQUEST_DATA_STREAM_DATA::default(),
36866            )),
36867            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36868            RESOURCE_REQUEST_DATA::ID => {
36869                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36870            }
36871            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36872                RESPONSE_EVENT_ERROR_DATA::default(),
36873            )),
36874            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36875                SAFETY_ALLOWED_AREA_DATA::default(),
36876            )),
36877            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36878                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36879            )),
36880            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36881            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36882            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36883            SCALED_PRESSURE_DATA::ID => {
36884                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36885            }
36886            SCALED_PRESSURE2_DATA::ID => {
36887                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36888            }
36889            SCALED_PRESSURE3_DATA::ID => {
36890                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36891            }
36892            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36893            SERVO_OUTPUT_RAW_DATA::ID => {
36894                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36895            }
36896            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36897            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36898                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36899            )),
36900            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36901                SET_ATTITUDE_TARGET_DATA::default(),
36902            )),
36903            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36904                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36905            )),
36906            SET_HOME_POSITION_DATA::ID => {
36907                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36908            }
36909            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36910            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36911                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36912            )),
36913            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36914                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36915            )),
36916            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
36917                SET_VELOCITY_LIMITS_DATA::default(),
36918            )),
36919            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36920            SMART_BATTERY_INFO_DATA::ID => {
36921                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36922            }
36923            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36924            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36925                STORAGE_INFORMATION_DATA::default(),
36926            )),
36927            SUPPORTED_TUNES_DATA::ID => {
36928                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36929            }
36930            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36931            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36932            TARGET_ABSOLUTE_DATA::ID => {
36933                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::default()))
36934            }
36935            TARGET_RELATIVE_DATA::ID => {
36936                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::default()))
36937            }
36938            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36939            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36940            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36941            TERRAIN_REQUEST_DATA::ID => {
36942                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36943            }
36944            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36945            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36946                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36947            )),
36948            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36949                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36950                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36951                ))
36952            }
36953            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36954                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36955                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36956                ))
36957            }
36958            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36959            UAVCAN_NODE_INFO_DATA::ID => {
36960                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36961            }
36962            UAVCAN_NODE_STATUS_DATA::ID => {
36963                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36964            }
36965            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36966                UTM_GLOBAL_POSITION_DATA::default(),
36967            )),
36968            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36969            VELOCITY_LIMITS_DATA::ID => {
36970                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::default()))
36971            }
36972            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36973            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36974            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36975                VICON_POSITION_ESTIMATE_DATA::default(),
36976            )),
36977            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36978                VIDEO_STREAM_INFORMATION_DATA::default(),
36979            )),
36980            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36981                VIDEO_STREAM_STATUS_DATA::default(),
36982            )),
36983            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36984                VISION_POSITION_ESTIMATE_DATA::default(),
36985            )),
36986            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36987                VISION_SPEED_ESTIMATE_DATA::default(),
36988            )),
36989            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36990            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36991            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36992            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36993            _ => None,
36994        }
36995    }
36996    #[cfg(feature = "arbitrary")]
36997    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36998        match id {
36999            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37000                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37001            )),
37002            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37003                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37004            )),
37005            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37006            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::random(rng))),
37007            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37008            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37009            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37010            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37011                ATTITUDE_QUATERNION_DATA::random(rng),
37012            )),
37013            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37014                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37015            )),
37016            ATTITUDE_TARGET_DATA::ID => {
37017                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37018            }
37019            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37020            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37021            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37022                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37023                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37024                ))
37025            }
37026            AUTOPILOT_VERSION_DATA::ID => {
37027                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37028            }
37029            AVAILABLE_MODES_DATA::ID => {
37030                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37031            }
37032            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37033                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37034            )),
37035            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37036            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37037            BATTERY_STATUS_V2_DATA::ID => {
37038                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::random(rng)))
37039            }
37040            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37041            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37042                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37043            )),
37044            CAMERA_FOV_STATUS_DATA::ID => {
37045                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37046            }
37047            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37048                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37049            )),
37050            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37051                CAMERA_INFORMATION_DATA::random(rng),
37052            )),
37053            CAMERA_SETTINGS_DATA::ID => {
37054                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37055            }
37056            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37057                CAMERA_THERMAL_RANGE_DATA::random(rng),
37058            )),
37059            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37060                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37061            )),
37062            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37063                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37064            )),
37065            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37066            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37067            CAN_FILTER_MODIFY_DATA::ID => {
37068                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37069            }
37070            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37071            CELLULAR_CONFIG_DATA::ID => {
37072                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37073            }
37074            CELLULAR_STATUS_DATA::ID => {
37075                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37076            }
37077            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37078                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37079            )),
37080            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37081                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37082            )),
37083            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37084            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37085            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37086            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37087            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37088            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37089                COMPONENT_INFORMATION_DATA::random(rng),
37090            )),
37091            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37092                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37093            )),
37094            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37095                COMPONENT_METADATA_DATA::random(rng),
37096            )),
37097            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::random(rng))),
37098            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37099                CONTROL_SYSTEM_STATE_DATA::random(rng),
37100            )),
37101            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37102                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37103            )),
37104            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37105            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37106            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37107                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37108            )),
37109            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37110            DEBUG_FLOAT_ARRAY_DATA::ID => {
37111                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37112            }
37113            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37114            DISTANCE_SENSOR_DATA::ID => {
37115                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37116            }
37117            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37118            ENCAPSULATED_DATA_DATA::ID => {
37119                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37120            }
37121            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37122            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37123            ESTIMATOR_STATUS_DATA::ID => {
37124                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37125            }
37126            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37127            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37128                EXTENDED_SYS_STATE_DATA::random(rng),
37129            )),
37130            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37131            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
37132                FIGURE_EIGHT_EXECUTION_STATUS_DATA::random(rng),
37133            )),
37134            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37135                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37136            )),
37137            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37138                FLIGHT_INFORMATION_DATA::random(rng),
37139            )),
37140            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37141            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37142            GENERATOR_STATUS_DATA::ID => {
37143                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37144            }
37145            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37146                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37147            )),
37148            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37149                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37150            )),
37151            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37152                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37153            )),
37154            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37155                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37156            )),
37157            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37158                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37159            )),
37160            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37161                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37162                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37163                ))
37164            }
37165            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37166                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37167            )),
37168            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37169                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37170            )),
37171            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37172                GLOBAL_POSITION_INT_DATA::random(rng),
37173            )),
37174            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37175                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37176            )),
37177            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37178                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37179                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37180                ))
37181            }
37182            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::random(rng))),
37183            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37184            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37185            GPS_GLOBAL_ORIGIN_DATA::ID => {
37186                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37187            }
37188            GPS_INJECT_DATA_DATA::ID => {
37189                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37190            }
37191            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37192            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37193            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37194            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37195            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37196            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::random(rng))),
37197            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::random(rng))),
37198            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37199            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37200            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37201            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37202            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37203                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37204            )),
37205            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37206            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37207            HIL_OPTICAL_FLOW_DATA::ID => {
37208                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37209            }
37210            HIL_RC_INPUTS_RAW_DATA::ID => {
37211                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37212            }
37213            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37214            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37215            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37216                HIL_STATE_QUATERNION_DATA::random(rng),
37217            )),
37218            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37219            HYGROMETER_SENSOR_DATA::ID => {
37220                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37221            }
37222            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37223                ILLUMINATOR_STATUS_DATA::random(rng),
37224            )),
37225            ISBD_LINK_STATUS_DATA::ID => {
37226                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37227            }
37228            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37229            LINK_NODE_STATUS_DATA::ID => {
37230                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37231            }
37232            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37233                LOCAL_POSITION_NED_DATA::random(rng),
37234            )),
37235            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37236                LOCAL_POSITION_NED_COV_DATA::random(rng),
37237            )),
37238            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37239                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37240                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37241                ))
37242            }
37243            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37244            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37245            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37246                LOGGING_DATA_ACKED_DATA::random(rng),
37247            )),
37248            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37249            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37250            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37251            LOG_REQUEST_DATA_DATA::ID => {
37252                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37253            }
37254            LOG_REQUEST_END_DATA::ID => {
37255                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37256            }
37257            LOG_REQUEST_LIST_DATA::ID => {
37258                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37259            }
37260            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37261            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37262            MANUAL_SETPOINT_DATA::ID => {
37263                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
37264            }
37265            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
37266            MESSAGE_INTERVAL_DATA::ID => {
37267                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
37268            }
37269            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
37270            MISSION_CLEAR_ALL_DATA::ID => {
37271                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
37272            }
37273            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
37274            MISSION_CURRENT_DATA::ID => {
37275                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
37276            }
37277            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
37278            MISSION_ITEM_INT_DATA::ID => {
37279                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
37280            }
37281            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37282                MISSION_ITEM_REACHED_DATA::random(rng),
37283            )),
37284            MISSION_REQUEST_DATA::ID => {
37285                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
37286            }
37287            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37288                MISSION_REQUEST_INT_DATA::random(rng),
37289            )),
37290            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37291                MISSION_REQUEST_LIST_DATA::random(rng),
37292            )),
37293            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37294                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
37295            )),
37296            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37297                MISSION_SET_CURRENT_DATA::random(rng),
37298            )),
37299            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37300                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
37301            )),
37302            MOUNT_ORIENTATION_DATA::ID => {
37303                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
37304            }
37305            NAMED_VALUE_FLOAT_DATA::ID => {
37306                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
37307            }
37308            NAMED_VALUE_INT_DATA::ID => {
37309                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
37310            }
37311            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37312                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
37313            )),
37314            OBSTACLE_DISTANCE_DATA::ID => {
37315                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
37316            }
37317            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
37318            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37319                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
37320            )),
37321            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37322                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
37323            )),
37324            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37325                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
37326            )),
37327            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37328                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
37329            )),
37330            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37331                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
37332            )),
37333            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37334                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
37335            )),
37336            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37337                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37338            )),
37339            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37340                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37341            )),
37342            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37343                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37344            )),
37345            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37346                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37347            )),
37348            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37349            OPTICAL_FLOW_RAD_DATA::ID => {
37350                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37351            }
37352            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37353                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37354            )),
37355            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37356            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37357                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37358            )),
37359            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37360                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37361            )),
37362            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37363            PARAM_EXT_VALUE_DATA::ID => {
37364                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37365            }
37366            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37367            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37368                PARAM_REQUEST_LIST_DATA::random(rng),
37369            )),
37370            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37371                PARAM_REQUEST_READ_DATA::random(rng),
37372            )),
37373            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37374            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37375            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37376            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37377            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37378            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37379                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37380            )),
37381            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37382                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37383            )),
37384            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37385            PROTOCOL_VERSION_DATA::ID => {
37386                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37387            }
37388            RADIO_RC_CHANNELS_DATA::ID => {
37389                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::random(rng)))
37390            }
37391            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37392            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37393            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37394            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37395            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37396            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37397                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37398            )),
37399            RC_CHANNELS_RAW_DATA::ID => {
37400                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37401            }
37402            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37403                RC_CHANNELS_SCALED_DATA::random(rng),
37404            )),
37405            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37406                REQUEST_DATA_STREAM_DATA::random(rng),
37407            )),
37408            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37409            RESOURCE_REQUEST_DATA::ID => {
37410                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37411            }
37412            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37413                RESPONSE_EVENT_ERROR_DATA::random(rng),
37414            )),
37415            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37416                SAFETY_ALLOWED_AREA_DATA::random(rng),
37417            )),
37418            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37419                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37420            )),
37421            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37422            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37423            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37424            SCALED_PRESSURE_DATA::ID => {
37425                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37426            }
37427            SCALED_PRESSURE2_DATA::ID => {
37428                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37429            }
37430            SCALED_PRESSURE3_DATA::ID => {
37431                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37432            }
37433            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37434            SERVO_OUTPUT_RAW_DATA::ID => {
37435                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37436            }
37437            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37438            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37439                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37440            )),
37441            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37442                SET_ATTITUDE_TARGET_DATA::random(rng),
37443            )),
37444            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37445                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37446            )),
37447            SET_HOME_POSITION_DATA::ID => {
37448                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37449            }
37450            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37451            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37452                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37453            )),
37454            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37455                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37456            )),
37457            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
37458                SET_VELOCITY_LIMITS_DATA::random(rng),
37459            )),
37460            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37461            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37462                SMART_BATTERY_INFO_DATA::random(rng),
37463            )),
37464            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37465            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37466                STORAGE_INFORMATION_DATA::random(rng),
37467            )),
37468            SUPPORTED_TUNES_DATA::ID => {
37469                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37470            }
37471            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37472            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37473            TARGET_ABSOLUTE_DATA::ID => {
37474                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::random(rng)))
37475            }
37476            TARGET_RELATIVE_DATA::ID => {
37477                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::random(rng)))
37478            }
37479            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37480            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37481            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37482            TERRAIN_REQUEST_DATA::ID => {
37483                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37484            }
37485            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37486            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37487                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37488            )),
37489            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37490                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37491                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37492                ))
37493            }
37494            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37495                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37496                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37497                ))
37498            }
37499            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37500            UAVCAN_NODE_INFO_DATA::ID => {
37501                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37502            }
37503            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37504                UAVCAN_NODE_STATUS_DATA::random(rng),
37505            )),
37506            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37507                UTM_GLOBAL_POSITION_DATA::random(rng),
37508            )),
37509            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37510            VELOCITY_LIMITS_DATA::ID => {
37511                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::random(rng)))
37512            }
37513            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37514            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37515            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37516                VICON_POSITION_ESTIMATE_DATA::random(rng),
37517            )),
37518            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37519                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37520            )),
37521            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37522                VIDEO_STREAM_STATUS_DATA::random(rng),
37523            )),
37524            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37525                VISION_POSITION_ESTIMATE_DATA::random(rng),
37526            )),
37527            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37528                VISION_SPEED_ESTIMATE_DATA::random(rng),
37529            )),
37530            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37531            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37532            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37533            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37534            _ => None,
37535        }
37536    }
37537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37538        match self {
37539            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37540            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37541            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37542            Self::AIRSPEED(body) => body.ser(version, bytes),
37543            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37544            Self::ALTITUDE(body) => body.ser(version, bytes),
37545            Self::ATTITUDE(body) => body.ser(version, bytes),
37546            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37547            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37548            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37549            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37550            Self::AUTH_KEY(body) => body.ser(version, bytes),
37551            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37552            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37553            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37554            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37555            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37556            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37557            Self::BATTERY_STATUS_V2(body) => body.ser(version, bytes),
37558            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37559            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37560            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37561            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37562            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37563            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37564            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37565            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37566            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37567            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37568            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37569            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37570            Self::CAN_FRAME(body) => body.ser(version, bytes),
37571            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37572            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37573            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37574            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37575            Self::COLLISION(body) => body.ser(version, bytes),
37576            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37577            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37578            Self::COMMAND_INT(body) => body.ser(version, bytes),
37579            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37580            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37581            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37582            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37583            Self::CONTROL_STATUS(body) => body.ser(version, bytes),
37584            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37585            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37586            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37587            Self::DATA_STREAM(body) => body.ser(version, bytes),
37588            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37589            Self::DEBUG(body) => body.ser(version, bytes),
37590            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37591            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37592            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37593            Self::EFI_STATUS(body) => body.ser(version, bytes),
37594            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37595            Self::ESC_INFO(body) => body.ser(version, bytes),
37596            Self::ESC_STATUS(body) => body.ser(version, bytes),
37597            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37598            Self::EVENT(body) => body.ser(version, bytes),
37599            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37600            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37601            Self::FIGURE_EIGHT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37602            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37603            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37604            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37605            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37606            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37607            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37608            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37609            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37610            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37611            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37612            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37613            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37614            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37615            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37616            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37617            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37618            Self::GNSS_INTEGRITY(body) => body.ser(version, bytes),
37619            Self::GPS2_RAW(body) => body.ser(version, bytes),
37620            Self::GPS2_RTK(body) => body.ser(version, bytes),
37621            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37622            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37623            Self::GPS_INPUT(body) => body.ser(version, bytes),
37624            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37625            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37626            Self::GPS_RTK(body) => body.ser(version, bytes),
37627            Self::GPS_STATUS(body) => body.ser(version, bytes),
37628            Self::GROUP_END(body) => body.ser(version, bytes),
37629            Self::GROUP_START(body) => body.ser(version, bytes),
37630            Self::HEARTBEAT(body) => body.ser(version, bytes),
37631            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37632            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37633            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37634            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37635            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37636            Self::HIL_GPS(body) => body.ser(version, bytes),
37637            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37638            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37639            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37640            Self::HIL_STATE(body) => body.ser(version, bytes),
37641            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37642            Self::HOME_POSITION(body) => body.ser(version, bytes),
37643            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37644            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37645            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37646            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37647            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37648            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37649            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37650            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37651            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37652            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37653            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37654            Self::LOG_DATA(body) => body.ser(version, bytes),
37655            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37656            Self::LOG_ERASE(body) => body.ser(version, bytes),
37657            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37658            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37659            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37660            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37661            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37662            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37663            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37664            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37665            Self::MISSION_ACK(body) => body.ser(version, bytes),
37666            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37667            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37668            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37669            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37670            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37671            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37672            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37673            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37674            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37675            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37676            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37677            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37678            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37679            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37680            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37681            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37682            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37683            Self::ODOMETRY(body) => body.ser(version, bytes),
37684            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37685            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37686            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37687            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37688            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37689            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37690            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37691            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37692            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37693            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37694            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37695            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37696            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37697            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37698            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37699            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37700            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37701            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37702            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37703            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37704            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37705            Self::PARAM_SET(body) => body.ser(version, bytes),
37706            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37707            Self::PING(body) => body.ser(version, bytes),
37708            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37709            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37710            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37711            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37712            Self::POWER_STATUS(body) => body.ser(version, bytes),
37713            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37714            Self::RADIO_RC_CHANNELS(body) => body.ser(version, bytes),
37715            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37716            Self::RAW_IMU(body) => body.ser(version, bytes),
37717            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37718            Self::RAW_RPM(body) => body.ser(version, bytes),
37719            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37720            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37721            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37722            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37723            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37724            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37725            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37726            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37727            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37728            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37729            Self::SCALED_IMU(body) => body.ser(version, bytes),
37730            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37731            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37732            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37733            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37734            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37735            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37736            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37737            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37738            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37739            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37740            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37741            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37742            Self::SET_MODE(body) => body.ser(version, bytes),
37743            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37744            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37745            Self::SET_VELOCITY_LIMITS(body) => body.ser(version, bytes),
37746            Self::SIM_STATE(body) => body.ser(version, bytes),
37747            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37748            Self::STATUSTEXT(body) => body.ser(version, bytes),
37749            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37750            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37751            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37752            Self::SYS_STATUS(body) => body.ser(version, bytes),
37753            Self::TARGET_ABSOLUTE(body) => body.ser(version, bytes),
37754            Self::TARGET_RELATIVE(body) => body.ser(version, bytes),
37755            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37756            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37757            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37758            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37759            Self::TIMESYNC(body) => body.ser(version, bytes),
37760            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37761            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37762            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37763            Self::TUNNEL(body) => body.ser(version, bytes),
37764            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37765            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37766            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37767            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37768            Self::VELOCITY_LIMITS(body) => body.ser(version, bytes),
37769            Self::VFR_HUD(body) => body.ser(version, bytes),
37770            Self::VIBRATION(body) => body.ser(version, bytes),
37771            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37772            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37773            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37774            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37775            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37776            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37777            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37778            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37779            Self::WIND_COV(body) => body.ser(version, bytes),
37780        }
37781    }
37782    fn extra_crc(id: u32) -> u8 {
37783        match id {
37784            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37785            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37786            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37787            AIRSPEED_DATA::ID => AIRSPEED_DATA::EXTRA_CRC,
37788            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37789            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37790            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37791            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37792            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37793            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37794            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37795            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37796            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37797                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37798            }
37799            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37800            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37801            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37802            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37803            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37804            BATTERY_STATUS_V2_DATA::ID => BATTERY_STATUS_V2_DATA::EXTRA_CRC,
37805            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37806            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37807            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37808            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37809            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37810            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37811            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37812            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37813            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37814            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37815            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37816            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37817            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37818            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37819            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37820            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37821            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37822            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37823            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37824            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37825            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37826            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37827            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37828            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37829            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37830            CONTROL_STATUS_DATA::ID => CONTROL_STATUS_DATA::EXTRA_CRC,
37831            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37832            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37833            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37834            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37835            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37836            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37837            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37838            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37839            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37840            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37841            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37842            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37843            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37844            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37845            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37846            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37847            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37848            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => FIGURE_EIGHT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37849            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37850            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37851            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37852            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37853            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37854            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37855            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37856            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37857            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37858            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37859            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37860                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37861            }
37862            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37863            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37864            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37865            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37866            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37867                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37868            }
37869            GNSS_INTEGRITY_DATA::ID => GNSS_INTEGRITY_DATA::EXTRA_CRC,
37870            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37871            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37872            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37873            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37874            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37875            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37876            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37877            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37878            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37879            GROUP_END_DATA::ID => GROUP_END_DATA::EXTRA_CRC,
37880            GROUP_START_DATA::ID => GROUP_START_DATA::EXTRA_CRC,
37881            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37882            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37883            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37884            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37885            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37886            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37887            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37888            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37889            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37890            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37891            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37892            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37893            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37894            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37895            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37896            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37897            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37898            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37899            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37900            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37901            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37902                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37903            }
37904            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37905            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37906            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37907            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37908            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37909            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37910            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37911            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37912            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37913            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37914            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37915            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37916            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37917            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37918            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37919            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37920            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37921            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37922            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37923            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37924            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37925            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37926            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37927            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37928            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37929            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37930            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37931            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37932            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37933            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37934            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37935            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37936            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37937            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37938            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37939            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37940            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37941            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37942            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37943            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37944            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37945            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37946            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37947            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37948            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37949            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37950            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37951            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37952            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37953            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37954            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37955            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37956            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37957            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37958            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37959            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37960            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37961            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37962            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37963            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37964            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37965            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37966            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37967            RADIO_RC_CHANNELS_DATA::ID => RADIO_RC_CHANNELS_DATA::EXTRA_CRC,
37968            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37969            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37970            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37971            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37972            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37973            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37974            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37975            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37976            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37977            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37978            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37979            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37980            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37981            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37982            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37983            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37984            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37985            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37986            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37987            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37988            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37989            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37990            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37991            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37992            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37993            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37994            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37995            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37996            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37997                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37998            }
37999            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38000            SET_VELOCITY_LIMITS_DATA::ID => SET_VELOCITY_LIMITS_DATA::EXTRA_CRC,
38001            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38002            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38003            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38004            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38005            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38006            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38007            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38008            TARGET_ABSOLUTE_DATA::ID => TARGET_ABSOLUTE_DATA::EXTRA_CRC,
38009            TARGET_RELATIVE_DATA::ID => TARGET_RELATIVE_DATA::EXTRA_CRC,
38010            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38011            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38012            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38013            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38014            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38015            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38016            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38017                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38018            }
38019            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38020                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38021            }
38022            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38023            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38024            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38025            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38026            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38027            VELOCITY_LIMITS_DATA::ID => VELOCITY_LIMITS_DATA::EXTRA_CRC,
38028            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38029            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38030            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38031            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38032            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38033            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38034            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38035            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38036            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38037            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38038            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38039            _ => 0,
38040        }
38041    }
38042    fn target_system_id(&self) -> Option<u8> {
38043        match self {
38044            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38045            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38046            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38047            Self::CAN_FRAME(inner) => Some(inner.target_system),
38048            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38049            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38050            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38051            Self::COMMAND_INT(inner) => Some(inner.target_system),
38052            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38053            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38054            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38055            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38056            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38057            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38058            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38059            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38060            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38061            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38062            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38063            Self::LOG_ERASE(inner) => Some(inner.target_system),
38064            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38065            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38066            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38067            Self::MISSION_ACK(inner) => Some(inner.target_system),
38068            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38069            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38070            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38071            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38072            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38073            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38074            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38075            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38076            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38077            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38078            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38079            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38080            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38081            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38082            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38083            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38084            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38085            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38086            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38087            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38088            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38089            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38090            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38091            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38092            Self::PARAM_SET(inner) => Some(inner.target_system),
38093            Self::PING(inner) => Some(inner.target_system),
38094            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38095            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38096            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_system),
38097            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38098            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38099            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38100            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38101            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38102            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38103            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38104            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38105            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38106            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38107            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38108            Self::SET_MODE(inner) => Some(inner.target_system),
38109            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38110            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38111            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_system),
38112            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38113            Self::TIMESYNC(inner) => Some(inner.target_system),
38114            Self::TUNNEL(inner) => Some(inner.target_system),
38115            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38116            _ => None,
38117        }
38118    }
38119    fn target_component_id(&self) -> Option<u8> {
38120        match self {
38121            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38122            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38123            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38124            Self::CAN_FRAME(inner) => Some(inner.target_component),
38125            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38126            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38127            Self::COMMAND_INT(inner) => Some(inner.target_component),
38128            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38129            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38130            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38131            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38132            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38133            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38134            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38135            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38136            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38137            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38138            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38139            Self::LOG_ERASE(inner) => Some(inner.target_component),
38140            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38141            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38142            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38143            Self::MISSION_ACK(inner) => Some(inner.target_component),
38144            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38145            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38146            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38147            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38148            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38149            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38150            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38151            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38152            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38153            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38154            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38155            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38156            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38157            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38158            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38159            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38160            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38161            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38162            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38163            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38164            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38165            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38166            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38167            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38168            Self::PARAM_SET(inner) => Some(inner.target_component),
38169            Self::PING(inner) => Some(inner.target_component),
38170            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38171            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38172            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_component),
38173            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38174            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38175            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38176            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38177            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38178            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38179            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38180            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38181            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38182            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38183            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38184            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_component),
38185            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38186            Self::TIMESYNC(inner) => Some(inner.target_component),
38187            Self::TUNNEL(inner) => Some(inner.target_component),
38188            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38189            _ => None,
38190        }
38191    }
38192}